PDA

View Full Version : controll the tabslider by two buttons


thipperudra
01-05-2004, 09:42 PM
Hi Antun,

In my application, i want to controll the tabslider by two buttons "Back" and "Next"(i will put these two buttons on top of tabelement1).Tabslider is consist 4 or more tabelement. If i clicking "Next" button,it opens the "tabelement2",if i clicking it ("Next" button) at second time it should opens the "tabelement3" , like that by clicking same "Next" button all tabelements should open one after another.And likely if i clicking "Back" button all tabelement should close (go back original state). How can i do this.

antun
01-06-2004, 09:38 AM
See here for how to open a tab programatically:

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=387

As for how to cycle through them, remember that each view has a subviews array. Since tabslider extends view, you will be able to access the individual tab elements using something like:


mytabslider.subviews[i]


... where i is the 0-based index of the tab element you want to access.

As described in the above post, you'll need to call the tab slider's openTab() method, with the tab element you want to open as an argument.

-Antun