Hi, guys,
I can create a editbox on the window. but, i don't know how to remove it.
Anybody know it?
Thanks,
Hawk
Hi, guys,
I can create a editbox on the window. but, i don't know how to remove it.
Anybody know it?
Thanks,
Hawk
Hi,
I can create a editbox on the window. but, i don't know how to remove it.
Anybody know it?
I swear I'm not being sarcastic but... uh... remove the code for it?
Regards,
Wayne
I think he meant remove the button programmatically. Assuming he's got
it added to a sizer:
sizer.Remove(self.editbox)
sizer.Layout()
You need to call Layout() to get it to recalculate the other widget
positions.
Kyle Rickey
Well Planner
INTEQ-OKC
405-671-2521
-----Original Message-----
From: Wayne Koorts [mailto:wayne@wkoorts.com]
Sent: Friday, October 19, 2007 2:20 AM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] How to remove controls from a window?
Hi,
I can create a editbox on the window. but, i don't know how to remove
it.
Anybody know it?
I swear I'm not being sarcastic but... uh... remove the code for it?
Regards,
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
I think what the OP wants to do is delete or hide the control while the
application is running. Typically, this seems to be done by putting the
items you want to remove on a panel and then using Remove to remove the
panel and then you'll also want to Hide() it. See this old post:
Mike
-----Original Message-----
From: Wayne Koorts [mailto:wayne@wkoorts.com]
Sent: Friday, October 19, 2007 2:20 AM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] How to remove controls from a window?Hi,
> I can create a editbox on the window. but, i don't know how
to remove it.
> Anybody know it?
>I swear I'm not being sarcastic but... uh... remove the code for it?
Regards,
Wayne
Mike Driscoll wrote:
From: Wayne Koorts [mailto:wayne@wkoorts.com] Sent: Friday, October 19, 2007 2:20 AM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] How to remove controls from a window?Hi,
I can create a editbox on the window. but, i don't know how
to remove it.
Anybody know it?
I swear I'm not being sarcastic but... uh... remove the code for it?
Regards,
WayneI think what the OP wants to do is delete or hide the control while the
application is running. Typically, this seems to be done by putting the
items you want to remove on a panel and then using Remove to remove the
panel and then you'll also want to Hide() it. See this old post:
It doesn't need to be that difficult. If you want to totally get rid of some widget just call its Destroy method. That will remove it from any sizer it may be in, remove it from the parent window, destroy its children if it has any, and then destroy the widget itself. If you want to just hide the widget then just call its Hide method. The sizer will adjust to it being hidden the next time it does a layout, (and you will probably want to call Layout yourself to help it along.)
-----Original Message-----
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!