[Gambas-user] gb.web.form: Preserve state of dialog window

Benoît Minisini gambas at ...1...
Sun Nov 13 15:50:27 CET 2016


Le 13/11/2016 à 15:39, Tobias Boege a écrit :
> Hi,
>
> I would like to have a dialog window (containing settings for the current
> session, say) which I want to show when the user clicks a button on some
> webform, with the following behaviour:
>
>  - the application should be usable while the window is visible,
>  - it should not be possible to have the window opened twice, and
>  - the controls in that window should retain their values after the
>    window was closed so that I can refer to these values from another
>    Webform and when the dialog is opened again, all controls are
>    properly initialised already with the settings the user left it with.
>
> Oddly, I can't do any of these, e.g. for point two above, I have a Webform2
> class (the dialog) and whenever I do
>
>   Webform2.Show()
>
> in Webform1, a new window is created containing a fresh instance of Webform2,
> regardless of whether Webform2 (which is Create Static) is already shown or
> not. I presume I misunderstand how gb.web.form works here? Is it possible to
> have a dialog such as above? (I'm currently running #7949.)
>
> Regards,
> Tobi
>

I think you need the Persistent property and a working Hide() method?

-- 
Benoît Minisini




More information about the User mailing list