Button to goto next tab / previous tab 
Author Message
 Button to goto next tab / previous tab

What is the syntax to go to the next tab on a sheet or the previous tab.  i
am kind of trying to create somewhat of a wizard interface.

Justin Rumpf



Mon, 18 Apr 2005 20:46:58 GMT  
 Button to goto next tab / previous tab
I place a button on each tab labeled Next.  Then, at the EVENT:Accepted
event embed for that button I put code similar to this in ....

IF INCOMPLETE() ! Checks for any missing required fields on the window
    Loc:IncompleteField = INCOMPLETE()
    IF Loc:IncompleteField{PROP:Parent} = ?ThisTab ! verifies whether the
missing field is on the current tab and stays here
        SELECT(Loc:IncompleteField)
        CYCLE
    END
END
Select(?NextTab) ! Go to the next tab if there are no incomplete fields on
this tab

Just make sure you name each tab ?ATabName that is easy to use.

I also drop a button on each tab labeled Previous.  That one just has
SELECT(?PreviousTabName).

The first tab only needs a Next button.  The last tab contains a Previous
and a Finished button.  The finished button, for me, is really just the OK
button.

--

- Andrew Guidroz II (GeeTroze)


Quote:
> What is the syntax to go to the next tab on a sheet or the previous tab.
i
> am kind of trying to create somewhat of a wizard interface.

> Justin Rumpf



Mon, 18 Apr 2005 21:24:14 GMT  
 Button to goto next tab / previous tab
Justin,
To select any given tab use:
  Select(?Sheet,<tab #>)

so to select the next tab, (assuming there is a next tab <g>)
  SELECT(?Sheet,CHOICE(?Sheet)+1)

And to select the prior tab:
  SELECT(?Sheet,CHOICE(?Sheet)-1)

As Andrew pointed out you may have to take field validation into account.
Choice(?Sheet) will tell you which TAB the user is currently on.  You can
also use the Sheet's Event:TabChanging and Event:Newselection to keep track
of what's going on.

-Mike


Quote:
> What is the syntax to go to the next tab on a sheet or the previous tab.
i
> am kind of trying to create somewhat of a wizard interface.

> Justin Rumpf



Mon, 18 Apr 2005 22:25:41 GMT  
 Button to goto next tab / previous tab
See "Wizards, Creating" in the help.
HTH

Rgds
Derek Henderson


Quote:
> What is the syntax to go to the next tab on a sheet or the previous tab.
i
> am kind of trying to create somewhat of a wizard interface.

> Justin Rumpf



Tue, 19 Apr 2005 13:22:44 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. problem with using TAB button in tabbed dialogs

2. Tabs, Tabs, Tabs!!

3. VO 2.0 buttons next/previous

4. Next and previous buttons on toolbar.

5. next/previous button

6. Detecting the current tab in a tab panel

7. Tabs within Tabs

8. Win95 Tab/TabStrip - Want to use keyboard navigation between tabs

9. Selecting TAB sheet by pressing TAB key

10. Tabbing through tabs

11. tab order inside tab

12. VI crashes on load because of hidden tab in tab control

 

 
Powered by phpBB® Forum Software