No event when user deselects a listbox item?

BlitzMax Forums/BlitzMax Programming/No event when user deselects a listbox item?

Fabian.(Posted 2005) [#1]
As I noticed there's no event when user deselects a listbox item. But I need it to do the following:
I've a window and a listbox and a button in it and I want to enable the button when user selects an item and to disable the button when user deselects the item. I guessed there's an event with source=listbox, data=-1 and id=EVENT_GADGETACTION when user deselects a listbox item, but it isn't. So, how else can I do something like this?


EOF(Posted 2005) [#2]
How about checking if SelectedGadgetItem(listbox) is -1 (which indicates nothing is selected) ?


skidracer(Posted 2005) [#3]
Which platform?


Fabian.(Posted 2005) [#4]
Jim Brown:
Checking SelectedGadgetItem(listbox) = -1 will only return if the listbox item is deselected, but not when it is. I need an event because I want to disable the button exactly at the time the user deselects the item.

skidracer:
Win32