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

Tobias Boege taboege at ...626...
Sun Nov 13 16:06:14 CET 2016


On Sun, 13 Nov 2016, Benoît Minisini wrote:
> 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?
> 

Yes, that may suffice. Would this Persistent property also solve the problem
in the attached project: if I set a property in Webform2, it seems to just
be discarded? Is that instance of Webform2 not managed by gb.web.form or
something?

More specifically in that project, I want that the contents of the TextArea
on Webform2 are preserved across closing that window (and preferably across
refreshing the page).

In another matter: I'd also be a fan of being able to turn the title bar of
a window off (without removing the capability to resize it), or rather to
render my own title bar. That blue and the big icons don't match the design
of my project very well.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-0.0.1.tar.gz
Type: application/octet-stream
Size: 11943 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20161113/e8410532/attachment.obj>


More information about the User mailing list