LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tab control scroll

Solved!
Go to solution

Hi All

The attached vi allows me to scroll sequentially through a number of pages using the mouse down anywhere on the pane.

 

When the scrolling reaches the last page, I would like the process to start from the first page again. In other words continue the cycle...1,2,3,4,5,1,2,3,4,5,1,2,3,4,5 etc.

 

But....I'm stuck at how to achieve this.

 

Could somebody, please, give me some assistance as to how I might do this?

 

Thanks for any help

Regards

Ray

 

 

0 Kudos
Message 1 of 4
(3,352 Views)

I think this will fullfill your need....

 

 

 


 

Dont forget to give kudos for good solution....

 

Smiley Wink

-----

The best solution is the one you find it by yourself
Message 2 of 4
(3,344 Views)
Solution
Accepted by topic author rayclout

One option is to use a shift register in the while loop.

In the attached I use a property node to calculate the number of pages on the tab. Using a combination of shift registers and quotient/remainder you can cycle round the page numbers. You now only need to write to a property node instead of reading then writing.

 

Note that your stop button is not working as you might intend. This is due to your 5 second timeout in the event structure. You may want to look at alternative ways to implement this.

Message 3 of 4
(3,342 Views)

Br.anad and _Ian_

 

Both elegant solutions, and much less coding work than the example I posted.

 

I wired them both up and learnt what was happening, but I think I preferred _Ian_' solution.

 

So, I will give the solution to _Ian_, but I will try to give kudos to both.

 

Thanks guys....I really appreciate your help. I'm still on a learning curve.

 

Best regards

Ray

 

0 Kudos
Message 4 of 4
(3,315 Views)