Piet van Zanten
WB 17: Splitter February 04, 2013 02:59PM |
PROCEDURE Save_SplitterPos(nPos) INIWrite("store","splitter",NumToString(nPos),fExeDir()+"\settings.ini")The storing is done in an ini file for simplicity reasons, but you may want to change that to a database or any other more convenient way.
AJAXExecute(Save_SplitterPos,BTN_Splitter..X)When the page is called we need to read (in the page global declarations or initialization code) the last position of the splitter:
nSplitterPos=Val(INIRead("store","splitter","0",fExeDir()+"\settings.ini"))nSplitterPos is a global int.
IF nSplitterPos<>0 THEN bMoving=True //set the global boolean to true to enable the move Move_Splitter(nSplitterPos) //do the move bMoving=False //reset the global boolean to false to stop move mode. END CELL_Left..Height=ZONE_Body..Height-10 CELL_Right..Height=ZONE_Body..Height-10 CELL_Right..Width=ZONE_Body..Width-CELL_Left..Width-50That's it, happy developping,
Allard
Re: WB 17: Splitter May 23, 2017 10:36PM |