LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically perform <TAB>

Solved!
Go to solution

Hello guys'n'gals!

 

I have a small program where the user is supposed to select some information from several Listboxes. Currently they can ofc move between these boxes with tab (i have a decent tab order), but they want to be able to use the arrow keys as they select by up/down in the boxes already.

 

So how can i call a <tab> on front panel?

(I'm trying to perform it in a key down event on <left> and <right> instead)

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 1 of 7
(3,138 Views)

Best way to do it, without using a dll, is to use the "Key Focus" property, when an arrow is pressed.

Use the key down event, as you wrote.

Build an array of references, of your controls, and each time an arrow is pressed, pass the next value of the array,

to the  "Key Focus" property

0 Kudos
Message 2 of 7
(3,122 Views)

I'm doing something similar, i'm using the controls[] from Pane, but it seems it's in 'almost' reverse tab-order (thus i must lower the index to move "forward"), and 2 occur in a different order to my tab order which i find strange. I assumed the Controls[] order _was_ the tab order ...

 

Anyway, now it stops in the middle of my controls, probably due to a hidden control.

 

Hmm, i'll use your idea of building an array of the visible controls.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 7
(3,116 Views)
Solution
Accepted by topic author Yamaeda
Another alternative, which will make things simpler for you, is to use the Key Down? event (note the ?). You can use the terminals on the right side to change the event data, so that if the key was Right, you replace it with a tab (ASCII 9, if memory serves). If it's Left, you can add Shift to the PlatMods terminal to move in reverse.

___________________
Try to take over the world!
Message 4 of 7
(3,115 Views)

Thanks for trying, i'm skipping it for now. I got stuck in a comment textbox from which i really dont want <Right> to leave the box and so on. They'll have to tab. 🙂

 

*update* Didn't see tst's comment. Suddenly it got interesting again ... i'll make a quick test.

 

/Y

Message Edited by Yamaeda on 11-16-2009 02:10 PM
G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 7
(3,103 Views)

There is a good blog-post on how to create a dynamic tab order here.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 6 of 7
(3,093 Views)

Key Down? - event was the key! 😉

 

Small and pretty solution, me like.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 7
(3,087 Views)