PDA

View Full Version : Rember clicked tab



nickdigital
07-06-2011, 04:43 PM
Can anyone clarify how to do this?
http://www.newtek.com/forums/showpost.php?p=189987&postcount=2

Thx.

sami
07-06-2011, 05:10 PM
Not sure what you are trying to do by "Remember clicked tab", but do you mean between script runs? If so, I recall (:tongue:) there's a store() and recall() function that works for that.

nickdigital
07-06-2011, 05:29 PM
My window size changes based on what a user has selected. Ideally I'd like to have the tab selection remain the same. Right now when the window size changes it goes back to having the first tab selected.

sami
07-06-2011, 05:39 PM
Can't you just put this code after you resize the window?


setvalue(ctl_MyTabs,int_TabIndex);

where int_TabIndex = the tab number you want to set (1 is the first tab). or does it not work?

sami
07-06-2011, 05:41 PM
Can't you just put this code after you resize the window?


setvalue(ctl_MyTabs,int_TabIndex);


where int_TabIndex = the tab number you want to set (1 is the first tab).

Save the current tab before you resize the window by:


int_TabIndex = getvalue(ctl_MyTabs);

or does this not work?

evenflcw
07-06-2011, 05:52 PM
Or just attach a ctlrefresh() udf to the ctltab. It'll be called when the user switches tab and provide the index value of the current tab. So just store that to a global variable, and have the ctltab set to that value each time panel reopens/resizes or whatever.

nickdigital
07-06-2011, 06:01 PM
It works because I know about this now. :D

Thx!