[wxPython-users] Deleting a text control from an EVT_TEXT_ENTER
Mike Rooney
mxr at qvii.com
Wed Jul 18 08:30:43 PDT 2007
Stephen Hansen wrote:
> I'm not sure how to fix your particular problem, but I have a
> suggestion for a different way to handle it: instead of creating a
> text control on the fly and destroying it, just create one when your
> custom control is first made... and .Hide() it.
>
> Then when you want to show it, you just reposition it and call
> .Show(). Later after you get the value (and clear it) you can .Hide()
> it again.
>
> Seems just as easy, you're just doing things in a different time then.
>
I am using a similar technique in one of my applications and it works
very well.
Though, for your application, since you are already using a ListBox, it
sounds like you might want to look into an EditableListBox, which you
can check out in the demo. I use this widget often and it is pretty
convenient. It allows you to (depending on flags) add, remove, rename,
and re-order items in the list.
Hope this helps.
- Mike
More information about the wxpython-users
mailing list