Listbox: How do I empty the view in the window

Michael Peuser mpeuser at web.de
Fri Sep 26 12:40:00 EDT 2003


"Marc" <mnations at airmail.net> schrieb im Newsbeitrag
news:4378fa6f.0309251330.2162e494 at posting.google.com...
> Hi all,
>
> I can't figure this out. I want the ability to delete an item in a
> listbox and leave the window area blank, like it is when the listbox
> is first created and nothing selected.
>
> Right now the following is happening. If I simply delete the item in
> the listbox, that item will stay in the view window until another item
> is selected. Or I can select an item in the listbox as active and then
> view it, but I don't want to do that.

Widgets are nor always aware whether their displayed view has been modified.
You can force this by:

  widget.update()

>
> I'm using the listbox to allow a user to either enter or select on
> option. As a result, I need the ability to clear out the window so
> they can type in their own selection.
>
> Can someone tell me how to do this?

Is this another question? Have you considered to use some MPW widget as
ComboBox?

Kindly
MichaelP






More information about the Python-list mailing list