LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tab control does not update after "highlight object" method

Hi All,

 

"Highlight object" is great. If your object is in a tab control then it even switches to the right tab for you! Perfect.

 

However! The tab control value does not update. This stopped me from correctly determining the selected tab.

 

Whilst playing around with a test case, I found that reading by reference the tab control value works.

 

I've attached the test case - switch tabs manually or with the "highlight" buttons and you'll see what I mean.

 

I think this is inconsistent behaviour and a possible CAR - does anyone with more knowledge of LabVIEW UI elements have a different perspective on this?

 

I hope that this helps the next guy out, at least!

 

Cheers.

Message 1 of 5
(2,760 Views)

Excellent example to demonstrate what you are talking about.  I agree with you that something doesn't seem right.

0 Kudos
Message 2 of 5
(2,754 Views)

I really dislike Tabs, for reasons such as this.  When I do use them it is typically just as a control (I make the pages as small as possible).  Then I usually populate a subPanel or a Picture control based on the value of the Tab selector.

 

In place of the Highlight Object method I tend to toggle the KeyFocus Property (read the value, write true, write old value back).  It switches the tab like the Highlight Object method, but no flashing.  It does suffer from the same bug however.  It also respects hidden and disabled tabs unlike the Highlight method (you may or may not want that behavior).

0 Kudos
Message 3 of 5
(2,744 Views)

Tabs are containers not controls or indicators.  Some strange things happen when you attempt to use them as things they are not (Like tring work with objects contained in a "tab" container)  Tabs may be usefull.  I avoid them. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 5
(2,737 Views)

Thanks for the input.

 

I use tabs quite a lot to keep UIs small and simple. I only use their control/indicator capability when it comes to manipulating the UI in some way. They do seem a bit ropey, though.

 

Another example of odd behaviour is controlling the current tab with a ring control (replace the tabs with a menu for when there are a lot of UI options) - the tabs do not respond to the ring control on some compilations. A forced recompile fixes the issue, until the next time...

0 Kudos
Message 5 of 5
(2,718 Views)