From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Xcontrol Key Navigation

All,

 

Just recently started using Xcontrols in my code.  After working through some of the quirks, I'm really enjoying the functionality and portability.  However, I've run into a problem which has me stumped.  For one application, I'm developing a touch-screen user interface.  However, my client has accelerated the development schedule, and the touch-screen hardware won't be available.  They don't want to use a mouse (rough environment), so I'm stuck with the good old fashioned QWERTY keyboard.

 

I can use "Key Navigation" to set certain Boolean controls to toggle.  However, I have a Boolean Xcontrol, the heart of my code's functionality, which really needs to be keyboard-enabled.  Looking at the "Key Navigation" properties, it doesn't appear that I can set a "Toggle" shortcut key for the Xcontrol.  I tried setting a focus shortcut key, which works just fine, but I still can't get my button to toggle as I expect.

 

Any thoughts or suggestions on keyboard navigation using Xcontrols?  Is there a better way to do this programmatically (i.e. Event Handling)?  Any feedback would be appreciated, thanks!

 

Mark

0 Kudos
Message 1 of 3
(2,484 Views)

Hi MJ,

 

If you want to capture Keyboard clicks, you should use events.  This is a good example of how to monitor for keyboard input in LabVIEW.

Stephen Meserve
National Instruments
0 Kudos
Message 2 of 3
(2,458 Views)

Thanks for the reply StarsHockey.  Unforunately, that's not exactly what I'm looking for.  I'd prefer to be able to tab to the control (or use F4 to set the focus), and then hit "Return" or "Enter" to operate the control just like any boolean.  I don't know how to do this for an Xcontrol.  Anyone out there wiser than me with a suggestion?

 

Thanks,

Mark

0 Kudos
Message 3 of 3
(2,436 Views)