Hi,
I would like to make a wizard-like interface based on a tabsheet with multiple tabs that opens / shows the next tab when clicking the ‘Next’ button. I manage to get the current tab and find to identify the next tab but there seems no option to ‘activate’ (show) it.
Is there a way to do this?
window xml (stripped):
<tabSheet id="tabs">
<tab id="first"
caption="First"
margin="true,false,false,false">
<label caption="First"/>
</tab>
<tab id="next"
caption="Next"
margin="true,false,false,false">
<label caption="Second"/>
</tab>
<tab id="last"
caption="Last"
margin="true,false,false,false">
<label caption="Third"/>
</tab>
</tabSheet>
<button caption="Next" invoke="nextTab"/>
And nextTab() function (stripped as well):
public void nextTab() {
String next;
switch (tabs.getTab().getName()) {
case "first":
next = "next";
break;
case "next":
next = "last";
break;
case "last":
next = "first"; // Loops the tabs
break;
}
tabs.getTab(next).activate(); // ???!! Would be nice to do something like this...
}
Any help appreciated.