Listbox: How do I empty the view in the window

M

Marc

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.

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?

Thanks,
Marc
 
M

Michael Peuser

Marc said:
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
 
M

Marc

Actually I was using the ComboBox but was just asking about the listbox part
of it. I was not aware of the .update() function. I had found a workaround
by deleting out the entryfield directly, but the update may be a cleaner
solution.

Thanks,
Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,164
Messages
2,570,898
Members
47,439
Latest member
shasuze

Latest Threads

Top