08-27-2014 03:21 PM
I have a scrolling tab which scrolls through the tab pages until the user presses Pause. That works. Now I want the tab control to stop on a specific page once the user presses Pause. How to do this?
08-27-2014 03:24 PM
Stop executing the part of the code that does the incrementing to step through the pages!
08-27-2014 04:26 PM
Well, hopefully I can give a simpler explanation of my project. There is a tab control (right now of 3 pages). I have written code which flips (scrolls) through the pages, one page per second approx. There is also a Pause button. When the user presses it, the scrolling of pages stops and whatever page is shown at the time of Pausing is the page that is viewable. So that could be page 1, 2, or 3 given when the Pause button was pressed.
But now, I would like to implement the feature that when the Pause button is pressed the tab control, through coding, has no choice but to show Page 1 (for example) or whichever page I restrict it to.
Actually I think I've got a idea now after typing this out, but your suggestions are very welcome!
I've attached screenshots of my code to this reply. The first two show Case States in my code (scrolling, not scrolling) and the 3rd isof the Front Panel and the tab panel itself.
08-27-2014 04:35 PM
Sorry if the screenshots are too cropped. I couldn't shrink down everything enough.
08-27-2014 05:51 PM
You could just write whichever case you want to the tab control inside of the Pause = TRUE case. That is the simple way based on what I see of your code.
08-27-2014 08:07 PM
One recommendation I would have is to keep the current page number in shift register and increment that number in the timeout event, rather than using the i iteration value. If you add other events they way you have it now, they would trigger the event structure and thus iterate the loop, and when you get back to the timeout case, it would appear that the code is jumping over certain tabs.
08-27-2014 08:59 PM - edited 08-27-2014 09:07 PM