Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide/Delete a StaticText in wxPython

I was wondering how to hide/delete a StaticText in wxPython?

like image 927
Souleiman Avatar asked Dec 28 '22 09:12

Souleiman


2 Answers

Have you tried control.Hide() or control.Show(False)?

like image 52
FogleBird Avatar answered Jan 18 '23 16:01

FogleBird


The widget's Hide/Show methods should work. If the widget is in a sizer, then you can use the sizer's Detach method to "hide" it but not destroy it. Otherwise, the sizer has a Remove method that will remove the widget and destroy it. And there's the widget's own Destroy method.

like image 23
Mike Driscoll Avatar answered Jan 18 '23 16:01

Mike Driscoll