On Friday 07 October 2016 11:48:51 mohamed hamza wrote:
>
>         All my forms are descending from a baseform  (simpleform).
>
>         Do I have to change baseform simpleform to baseform tabform?
>         In that project I have only 2 forms to keep in memory among 11.
>         In fact where do I have to create the new form?   ( onGetSubForm
> ....) or do I have to use stat file to restore last values?
>
Depending on your needs there are different possibilities.
If the all the pages should stay alive and in memory ttabform descendants can 
be used as tabpages:
"
 <thetabwidget>.add(itabpage(<ttabformdescendant>.create(<theowner>)));
"
If the pages should be created if the page the first time becomes active and 
destroyed if another page will be selected ongetsubform can be used. In this 
case the state of the forms get lost and must be restored by tstatfile for 
example. One option is to use a tstatfile with options sfo_memory set, it 
will use an in-memory file in order to store the status. Please don't forget 
to give the statfiles for the different tab pages different file names.

The memory files can be stored/reloaded automatically by the main statfile of 
the application by setting the "savedmemoryfiles" filemask of the main 
statfile. If for example the memory statfiles of the tabpages have the 
filenames 'afo.sta', 'bfo.sta', 'cfo.sta' <mainstatfile>.savedmemoryfiles 
= '*fo.sta' will save them at application end and restore on application 
start.

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to