LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tabbed Controls Flashing When Invisible

Solved!
Go to solution
A little background: I have a tab control that contains multiple sub controls and this tab control sits on top of a vision acquisition screen. During the program's operation, the user can hit the "h" key to hide all the controls so the user can see the entire vision acquisition screen. I've come across a bug that while doesn't break my app, is sincerily annoying. What happens is that when the user hits the "h" key, all the controls disappear as expected (I achieve this using the "visable" property node for the tab control), but about once a second the controls inside the tab flash onto the screen and then are gone again. Again, these are the controls inside the tab, not the tab it's self. The tab it's self is invisible as expected. Has anyone else seen this before?
0 Kudos
Message 1 of 5
(2,622 Views)

Can you post an example that demonstrates this? 


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

Unfortunately I can't post the exact code here due to technicial disclosure red tape.  I did try to mock up what I am doing in a seperate VI, but it works perfectly, so there must be something with my implementation of it.

 

I've attached the mockup VI, and although it doesn't display the bug, it does give you an idea of what I'm trying to do.  Note:  You will need labview 2010 and vision acquisition 2010 to open it.

0 Kudos
Message 3 of 5
(2,600 Views)
Solution
Accepted by topic author MGould

Just guessing here but I have seen some funny things with Tab controls, especially when working with visability property.  I suspect that "Under the hood" LabVIEW uses the visability property to make Tabs work. 

 

In your example I( notied that you are writing the property every iteration.  This isn't too great a method and can lead to some ineffecintcies.  Also, when objects overlap on the FP an update to any overlaping object requires all the objects to get refreshed so you can lose a lot of processor time that could bog down your CPU. One possible work-around you could try is adding a secod loop with an event structure in it to catch only the changes to the visable boolean.  Another thing to try would be to hit the visable property of the objects on the tab directly.  A reasonable example is this snippet.

 

Visible.png


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

I agree that setting the visable option isn't efficent, in my source code it only happens once when the user hits the "hide" key, and it was just expediant to do it that way for the example.

 

In my code, I went ahead and changed visable property of the offending controls and that seems to have fixed it.  It's a little bit of a kluge, but I will mark that as the solution.  Thanks for your help.

Message 5 of 5
(2,568 Views)