Jump to content
jhony

howto go next tab by clicking next button and previous button by using tab controls

Recommended Posts

Hi

 I am new to labview .i am using tab control consisiting of four pages. if i click next button it should goto page 2.if i click previous button it should go to page 1.can any one help me please 

Share this post


Link to post
Share on other sites

You can use tabs like regular numbers. Increment to get to the next page, decrement to get to the previous one. This is an example:

Simple Tab Page Switcher.png

Of course you need to add additional checks to prevent the "Previous" button to skip from page 1 to page 5 and things like that.

Share this post


Link to post
Share on other sites

In a slightly more advanced way, you can use a property node to get the array of pages (references). The number of elements in that array is the number of pages, so you can use this number instead of the constant for the comparison LogMAN is using to stop the loop. 

  • Like 1

Share this post


Link to post
Share on other sites

Or even better there is an OpenG function that given an enum will return all the unique values of an enum, and it works just the same on a tab (since a tab uses an enum for its value).  This function is under the LabVIEW Data package named Get Strings from Enum.  Then there is no need for reference or property nodes.

Share this post


Link to post
Share on other sites

Native support?  Even better.  I knew those Variant functions were on the palette but for some reason didn't realize that was one of them.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.