Hi Martin,

    I can explain what I do :

      In the Mainform  I have the event 

              OnGetSubForm (.......)
                  begin
                      submoduleclass:=widgetclassty(ttabpage(sender).tag);  ( 
ttabpage(sender).tag contains a pointer to tmseform (simple form_)
                  end;

       1 For Each form created I have an Oncreated event  which is responsible 
to init var.
       2 For some forms I have to disable widgets depending on tdataset opened.

       Then when I change tabpage and come back later  I lose last values and 
status ( disabled) of widgets

        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?
       
        Best regards 
        Med
        
         
       
                










             
________________________________________
De : Martin Schreiber [[email protected]]
Envoyé : vendredi 7 octobre 2016 04:27
À : [email protected]
Objet : Re: [MSEide-MSEgui-talk] statfile

On Thursday 06 October 2016 19:29:42 mohamed hamza wrote:
> Hi Martin,
>
>        I used  simple form  instead tabform in tabwidget . Now I lose stat
> ( enabled/disabled, last value ... ) of all widgets when I change tabpage .
> I tried to use statfile to restore but no success.Do I have to change all
> form to tabform?
>
ttabform can be used as tabpage, has options to be created on the fly and to
be destroyed if it is not the active tab and some more tabpage specific
properties. If you don't need that, normal forms and widgets can be used
instead. I assume you insert the simple form in a ttabpage? Do you destroy
the inserted form later? Maybe make a siple demo project which shows the
problem.

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

------------------------------------------------------------------------------
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