LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tab activate inactive controls

Solved!
Go to solution

Hi all,

Running LV7.0.  Just set tab order on main vi.  Main vi has a few tab controls, each tab control with multiple pages, each page has controls.  When hardware is plugged in via USB, the program talks to it, determines what options it has installed, and enables/disables the appropriate tab pages.  Using the mouse, the disabled  tab pages cannot be selected, so any buttons residing on a disabled tab cannot be clicked.  However, using the tab button, I can tab to the tab control, and use left and right arrow keys to go through the tab pages, even the disabled ones.  Whats more, if I stop on a disabled tab page, press tab again, it will select disabled buttons on the disabled page.  Pressing the enter key, I can activate that option.  How do I stop the tab button from allowing me access to disabled tab pages?

Thanks.

 

0 Kudos
Message 1 of 13
(5,727 Views)

rickford66 wrote:

Hi all,

Running LV7.0.  Just set tab order on main vi.  Main vi has a few tab controls, each tab control with multiple pages, each page has controls.  When hardware is plugged in via USB, the program talks to it, determines what options it has installed, and enables/disables the appropriate tab pages.  Using the mouse, the disabled  tab pages cannot be selected, so any buttons residing on a disabled tab cannot be clicked.  However, using the tab button, I can tab to the tab control, and use left and right arrow keys to go through the tab pages, even the disabled ones.  Whats more, if I stop on a disabled tab page, press tab again, it will select disabled buttons on the disabled page.  Pressing the enter key, I can activate that option.  How do I stop the tab button from allowing me access to disabled tab pages?

Thanks.

 


Skip this control when tabbing is on the Key Navagation page of the control properties (Unfortunatly this feature was introduced in LV 8.0.)

 

however in LV 7.1 And 7.0 you can only access "Skip-when tabbing" from a property node. so you will need to programatically set the "disabled" controls' skip when tabbing  property. 

 

In


"Should be" isn't "Is" -Jay
Message 2 of 13
(5,714 Views)

right click a control that don't want the user to tab to.

 

right-click Advanced >>> Key navigation

 

clcik the "Skip ... while tabbing".

 

lather rinse repeat for all others.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 13
(5,712 Views)

The problem is not that I need to select "Skip when tabbing".  I'm familiar with that selection.  The problem is, sometimes I need to skip it, and other times I don't.  Let me see if I can better explain the problem.

 

I have a few controls on the main screen that are not in tabs.  They have their "skip when tabbing" unchecked, so the control can be activated by the tab... so long as the control itself is not disabled.  All disabled controls on the main screen are automatically skipped when tabbing, even though their skip when tabbing property is unchecked.  If I plug a device into the USB that has the correct hardware to support a given option, those previously disabled controls will become enabled (done programmatically with enabled property) and now, when tabbing, these controls are no longer skipped.

 

Compare that to, when controls are located on a tab control page.  Some of the pages are disabled, others are not.  Like the previous controls, these tab pages may or may not be disabled, depending on the hardware connected to the computer.  If the hardware does not support a particular option, that tab page is disabled and grayed.  I cannot activate it with the mouse, but I can activate it by tabbing to it.  Any buttons located on that tab page can also be activated by tabbing to the button, even though the button is also inactive.  How do I get LV to skip disabled and grayed pages in a tab control, while allowing other pages to be tabbed to?

 

Thanks.

 

0 Kudos
Message 4 of 13
(5,706 Views)

Thanks Ben!

Too long since I worked in 7.0-  Smiley Happy

Still, I think the OP needs to dynamically set this at run-time based on operational paramenters


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 13
(5,704 Views)
Solution
Accepted by topic author rickford66

How do I get LV to skip disabled and grayed pages in a tab control, while allowing other pages to be tabbed to.  Cannot be done.  you will be able to tab to a disabled page unless you disable tabbing on the whole tab control.

 

You can disable tabbing on all of the controls on the disabled page In this manner

Skip.PNG

 

Remember to close your refs


"Should be" isn't "Is" -Jay
Message 6 of 13
(5,699 Views)

Tab control and LV 7.0 may be rough to offer more help.

 

Hair brained idea....

 

Set all control to be skipped except one of screen boolean that when pressed sets the key focus to the next element in a list of all of your controls. Associate another key like F3 with the boolean to the simulated tabbing. I admit that this work-around is not trivial but I don't like using the phrase "you can't do that..." since somebody eventually tells me I'm wrong and posts a demo.

 

Hmmmm... may be it will work for you, lets give it a try.

 

You can't do that in LV 7.0.

 

Lets see how long it takes this time. Smiley Tongue

 

Ben

 

Edit -1 minutes. not bad.

Message Edited by Ben on 03-16-2010 02:11 PM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 13
(5,698 Views)

Jeff - It looks like you are on the right track.  I understand what you are doing there.  I had come up with a solution to hide those tabs, but I would rather leave them gray and shaded... kinda lets a customer know what is available if they want to upgrade.  🙂   Last question, what do you mean, close my refs?  It sounds like a reference to releasing memory, but I've only programmed in managed environments, for the most part.  ie, garbage collector in .net.  How do I close my refs?

Thanks.

 

Message Edited by rickford66 on 03-16-2010 02:25 PM
0 Kudos
Message 8 of 13
(5,688 Views)

Ben wrote:

Tab control and LV 7.0 may be rough to offer more help.

since somebody eventually tells me I'm wrong and posts a demo.

 

Hmmmm... may be it will work for you, lets give it a try.

 

You can't do that in LV 7.0.

 

Lets see how long it takes this time. Smiley Tongue

 

Ben

 

Edit -1 minutes. not bad.

Message Edited by Ben on 03-16-2010 02:11 PM

Smiley Very Happy

But I encluded "you cannot..." too


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 13
(5,683 Views)

close.PNG

For speed I did not use the close referance vi in my example.  This leaves the referances in memory and is poor programming.  When you open a refnum close it when your done-like the fridge door.  Since I sent an example with poor practice- I brought attention to it


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 13
(5,678 Views)