LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to bind a shortcut key to a button?

Hello,

 

Want to make a button which can be pressed not only using the mouse but also can using a shortcut key, e.g, making a button which has a  "Enter" caption, I hope one can pressed it by press the "ALT+E" shortcut, and also hope display the "E" with underline beside the caption, anyone can advise me how to do this? Thanks.

 

David

Message 1 of 4
(7,964 Views)

You can use Advanced > Key Navigation to assign special buttons (<Enter>, <Esc>) to the button. There is also a property node for that. As far as I know you can't use Alt-E that way.

For this, you need a event structure and monitor the key down events. Whenever the condition (Alt+E) in this case is met, you eigther can use the key focus property or the value signaling property.

 

To get it underlined, just mark the character on your button and select Style Underline from the fonts drop-down.

 

Felix

Message 2 of 4
(7,955 Views)

Find the Eample VI.

Source link:http://forums.ni.com/ni/board/message?board.id=170&message.id=398480#M398480

Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
Message 3 of 4
(7,933 Views)

Hello F.S,

 

For the marking underline to the "E", it seems can not just mark the only one character, e.g., if the button's label is "Enter (E)", when just select the 'E', then take underline, the all strings is marked the underline, how to take affecting just to the 'E'?

 

David 

0 Kudos
Message 4 of 4
(7,921 Views)