int getCtlTab(int n, int t)
If t is 0, the function returns the tab sheet the control is on. If t is non-zero, it returns the tabsheet number of the tab the control has been assigned to. Returns -1 if the user control number is out of range.
Returns the tab control or tab sheet that a user control has been assigned to.
Due to the design of this function, the tab control index number should be 1 or higher. If the tab is control #0, you won't be able to use getCtlTab to retrieve the sheet number the control is on.
%fml ctl[1]: TAB, Text="page0\npage1", Pos=(250, 5), Size=(200, 100) ctl[2]: STANDARD, Text="Slider", Pos=(280,*) ctl[8]: PUSHBUTTON, Text="Move slider to other tab sheet", Pos=(250, 120), Size=(150,*) OnCtl(n): { if (n==8 && e==FME_CLICKED) { // If not already on page1, // move slider to page1 if (getCtlTab(2, 1) != 1) { setCtlTab(2, 1, 1); } else { // Move back to page0 setCtlTab(2, 1, 0); } } return false; }