04-04-2013 11:14 AM
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.
04-04-2013 11:47 AM
Excellent example to demonstrate what you are talking about. I agree with you that something doesn't seem right.
04-04-2013 12:36 PM
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).
04-04-2013 01:26 PM
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.
04-05-2013 04:53 AM
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...