LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keyboard navigation for Buttons

I got OK and Cancel buttons on the VI. Would like to be able to use Keyboard
navigation, say, I press Alt+O, and keyboard focus goes to my OK button. I
would also prefer that O in OK is highlight under it, like windows buttons
do. Is it possible to do under LV and how to do it?

I know I can use a tab order and do it that way.

BTW - Any reasons for LV not to allow design time properties? What I mean is
that when I am designing my GUI, I can click on controls and select what
color, size, visible or not, panel size, at design time and then change (if
and when needed) through code. Like VB or CVI or VC++.


vishi
0 Kudos
Message 1 of 4
(3,860 Views)
Maybe this will help: from help files:

You can assign keyboard shortcuts to controls so users can navigate the front panel without a mouse. You can assign modifiers, such as the and keys, to some shortcut keys. You cannot assign the same key combination to more than one control.
Complete the following steps to set key navigation for a control and to set a control so it is not included when the user tabs from control to control while running the VI.

1. From the front panel, right-click a control and select Advanced»Key Navigation. The Key Navigation dialog box appears.

Note The Advanced»Key Navigation shortcut menu item is dimmed for indicators because you cannot enter data in an indicator.

2. Select the shortcut key you want to assign to th
e control from the ring control in the Key Assignment section of the dialog box.

If the Modifiers section is available, select the Shift Key and/or the Control Key checkboxes, if you want a keyboard shortcut to include the key and/or key. This section is available if you select a function key, such as , , and so on, in the Key Assignment pull-down menu. You can select multiple modifiers.

3. To prevent users from accessing a control using the key while the VI is running, place a checkmark in the Skip this control when tabbing checkbox.

I think the design time properties you speak of are property nodes - rt click>>create property node - then change the property
0 Kudos
Message 2 of 4
(3,860 Views)
Paul,

Didn't help or maybe I am not understanding the help files.

I am looking for a way where I can have a particular char. of the button
underlined, like "O" for the OK button. Here is a picture.



And when I press ALT+O, I want the OK button to be pressed.



vishi



"paul_s" wrote in message
news:506500000005000000F1EB0000-1042324653000@exchange.ni.com...
Maybe this will help: from help files:

You can assign keyboard shortcuts to controls so users can navigate
the front panel without a mouse. You can assign modifiers, such as the
and keys, to some shortcut keys. You cannot assign the
same key combination to more than one control.
Complete the following steps to set key navigation for a control and
to set a cont
rol so it is not included when the user tabs from control
to control while running the VI.

1. From the front panel, right-click a control and select
Advanced?Key Navigation. The Key Navigation dialog box appears.

Note The Advanced?Key Navigation shortcut menu item is dimmed for
indicators because you cannot enter data in an indicator.

2. Select the shortcut key you want to assign to the control from
the ring control in the Key Assignment section of the dialog box.

If the Modifiers section is available, select the Shift Key and/or the
Control Key checkboxes, if you want a keyboard shortcut to include the
key and/or key. This section is available if you select
a function key, such as , , and so on, in the Key Assignment
pull-down menu. You can select multiple modifiers.

3. To prevent users from accessing a control using the key
while the VI is running, place a checkmark in the Skip this control
when tabbing checkbox.

I think the design time properties y
ou speak of are property nodes -
rt click>>create property node - then change the property



[Attachment DialogBox.bmp, see below]
0 Kudos
Message 3 of 4
(3,860 Views)
You might be able to do what you want using the keyboard vi's. You will have to go through them and find what you're looking for. The keyboard scanner in keyex.llb might be a good place to start, and you will have to work out a way to customise the control to behave the way you want. Check out the llb's at http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000CE3B0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_TIER_0=0&USEARCHCONTEXT_TIER_S=0&USEARCHCONTEXT_QUESTION_0=keyboard&USEARCHCONTEXT_QUESTION_S=0
0 Kudos
Message 4 of 4
(3,860 Views)