03-11-2010 07:29 PM
I have a program I am working on to test a product. On the front panel I have key focus on a string control so that our service techs can scan a barcode. I then wanted to have a tab so that the user could pull up a page with different information on it.
The problem: With key focus on, it immediately brings the tab back to the first page where the control is.
I have tried to conditionally turn off key focus when I change tabs, but then it jumps back to the original tab before the focus gets turned off. Is there a good way to programatically turn on and off key focus based on which tab is active? I know I could keep that control outside the tabs, but it doens't look right and there is no need for the user to input anything into that box if any other tab is up.
~Thanks
03-11-2010 09:57 PM
How exactly are you setting key focus. It should only need to be done once at the beginning and again when a value change event happens on the tab control. You woudn't be doing it continuously in a loop, would you? If you have more than the base version of LabVIEW, use an event structure.
p.s. keeping a control outside the tabs does not affect the appearance when the VI is running.
03-12-2010 08:17 AM
I've just started learning how to use event structures and was looking at doing that. I'll have to dig into that more.
This is also my first time using tabs, and I'm confused about your comment regarding the control appearance. In order to keep a control outside a tab, wouldn't it be visible regardless of which tab you select, because it is for example in the space above? In which case it would appear different than if I had it in the tab and therefore only visible when that tab was selected.
Thanks.
03-12-2010 09:43 AM