04-06-2017 12:14 PM
I just realized that when you select a field in a Table, and press Enter button, a File Dialog appears, and you can load ascii data into the table. I wanted to disable this feature, but I cannot find it in any of the Table settings. As a workaround, I managed to disable this to happen by capturing any "Key Down?" Event, and discarding it.
Is there any other way to disable this feature?
Solved! Go to Solution.
04-06-2017 12:21 PM
What version of LabVIEW? Are you talking about a table control on the front panel?
I can't replicate what you are saying. In LV16, once I select one of the cells and hit enter, the cursor just jumps to the cell below.
04-06-2017 12:24 PM
LV 2015 SP1 32bit. System Table indicator. I can post vi tomorrow.
04-06-2017 01:21 PM
Ok, I got access to LV now. I managed to reduce my code into a small chunk, and reproduce the behaviour. It looks like this happens with a combination of a Boolean button used to prompt user to select file to load its data into the table. Somehow when I click into a field of this Table indicator, and press Enter key, the key focus jumps to the "Import" button, and triggers its Event case.
It is not really clear to me why this happens. I guess this is intended???
Here is the snippet, VI tested in LV2015/2016, same result:
04-06-2017 01:36 PM
@Blokk wrote:
Ok, I got access to LV now. I managed to reduce my code into a small chunk, and reproduce the behaviour. It looks like this happens with a combination of a Boolean button used to prompt user to select file to load its data into the table. Somehow when I click into a field of this Table indicator, and press Enter key, the key focus jumps to the "Import" button, and triggers its Event case.
It is not really clear to me why this happens. I guess this is intended???
Here is the snippet, VI tested in LV2015/2016, same result:
Intended but the developer that set-up the keyboard short cut for the "Import" button.
Ben
04-06-2017 01:43 PM - edited 04-06-2017 01:44 PM
Don't beat yourself up to bad once you read the next sentence.
You have key navigation on that Import File button set to Toggle on the enter key. Hitting enter anywhere on the VI causes it to activate. It is not directly related to the table.
EDIT: Ahhh! Ben beat me to it while I was figuring it out.
04-06-2017 01:50 PM - edited 04-06-2017 01:52 PM
Haha, this is what I just did not check. I have NO idea how this button got this setting! I never program such key toggle for my buttons. I also checked, none of the system ,silver, System Controls 2.0, etc buttons have this by default.
Thanks, next time when I see such behaviour, I will know immediately where to check. Crazy, no idea how it got this setting... 🙂
edit: ok, figured out what tricked me! Curse on the "User Interface Event Handler" template! I used that as starting point! 😄
The "Command 1" button has this preset...
04-06-2017 01:57 PM
Quoting my Grandfather "Loose nut behind the wheel."
I have done worse.
I once posted a Boolean that I simply could not get it to change states no matter what I did.
Dennis came right back and pointed out it was "disabled' but not "disabled and greyed out".
Ben