LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tab control color

Solved!
Go to solution

@OlliesCamel wrote:

The event is registered to the tab value change. As a result, every time you click a tab, the event fires and changes the value to either 2 or 4. Thus, you change tabs to your selected tab and then almost immediately return to either Page 2 of Page 4.

 

In terms of "resetting the timer," I'm not sure what you mean. Could you elaborate?


Ahhh, I see. What would you recommend for a good workaround for that? 

 

When I say "resetting the timer", I am referring to the timeout. For instance, before if the timeout was set to 30 seconds, then it would switch tabs after the 30 seconds were up. However, if at 22 seconds, I decided to click to another tab, then those 30 seconds would start back up again from 0.

0 Kudos
Message 11 of 14
(1,122 Views)

It makes sense for the newly clicked tab to reset the timeout. You don't want to change the tab manually just to have the code advance it possibly a few ms later. Don't fight the user!
If you still want to switch at the old phase, simply keep track of the already elapsed time and dynamically change the timeout.
I posted an example long ago. (Posting by phone, will check later)

0 Kudos
Message 12 of 14
(1,118 Views)

@jmejiagusmer wrote:
Ahhh, I see. What would you recommend for a good workaround for that? 

did you even look at my example?

0 Kudos
Message 13 of 14
(1,108 Views)

@altenbach wrote:

@jmejiagusmer wrote:
Ahhh, I see. What would you recommend for a good workaround for that? 

did you even look at my example?


Yes, I did look at the example and I couldn't get it to automatically cycle through the tabs, as well as being able to click and view the tabs that I wanted because I hadn't noticed that in your example, you created two cases in one event tab. The first event included both a timeout and a tab control value change. I just got it to work a few minutes ago by splitting it up into two different events and now everything appears to be working perfectly! Thank you  

0 Kudos
Message 14 of 14
(1,100 Views)