[Gambas-user] destroying and re-creating objects in a form

Benoit Minisini gambas at ...1...
Fri Sep 26 00:51:51 CEST 2008


On vendredi 26 septembre 2008, Benoit Minisini wrote:
> On jeudi 25 septembre 2008, M0E Lnx wrote:
> > I have a form with buttons, textlabels, and the like.
> >
> > Is there a way to destroy these objects and then re-create them?
> > I was told on another thread about translations that for translations
> > to take effect this needs to be done....
> >
> > I have tried the object's delete methods, that indeed destroys the
> > object... but I dont know how to get it back with it's new properties
> > now
> >
> > Please help
>
> Hi,
>
> I have committed some changes in revision #1600 that fixes the crash you
> encountered.
>
> Now, during the FMain.Button1_Click event handler, you can do the following
> safely:
>
>   System.Language = ...
>   ME.Delete
>   FMain.Show
>
> The WAIT is not needed anymore, as now the deleted forms become immediately
> invalid, and so the call to FMain.Show recreates a new one (with the new
> translations).
>
> Regards,

Rather use the revision #1601, as it seems that you use gb.gtk.

Regards,

-- 
Benoit Minisini




More information about the User mailing list