Removing objects

Hi Wesley,

It depends what you want. If you want to hide the text (not the same as a delete of the control), you can simply say control.Show(False)

-----Oorspronkelijk bericht-----

···

Van: Wesley Nitsckie <wesleynitsckie@gmail.com>
Verzonden: zo 10-08-08 21:26:17
Aan: wxpython-users@lists.wxwidgets.org;
Onderwerp: [wxpython-users] Removing objects

How do can I remove a StaticText object from a panel at run time?

Wesley

!DSPAM:489f40d974221804284693!

If, on the contrary, Wesley just wants to delete the StaticText (or any other object on the frame) this can be done by calling the method Destroy() of wx.Window.
BEWARE: if the object was created by assigning it to a variable, e.g.:
self.var = wx.Statictext(etc.)

don’t forget to destroy also the variable with
del self.var

lest an exception is raised if you reuse self.var.

···

2008/9/4 Dick Kniep dick.kniep@lindix.nl

Hi Wesley,

It depends what you want. If you want to hide the text (not the same as a delete of the control), you can simply say control.Show(False)

-----Oorspronkelijk bericht-----

Van: Wesley Nitsckie wesleynitsckie@gmail.com

Verzonden: zo 10-08-08 21:26:17

Aan: wxpython-users@lists.wxwidgets.org;

Onderwerp: [wxpython-users] Removing objects

How do can I remove a StaticText object from a panel at run time?

Wesley

!DSPAM:489f40d974221804284693!


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users