Add #PB_EventType_Focus and #PB_EventType_LostFocus events to noneditable ComboBoxGadgets

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Quin
Addict
Addict
Posts: 1133
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Add #PB_EventType_Focus and #PB_EventType_LostFocus events to noneditable ComboBoxGadgets

Post by Quin »

The title pretty much sums up this one. The documentation states:
#PB_EventType_Focus : The edit field received the keyboard focus (editable ComboBox only).
#PB_EventType_LostFocus: The edit field lost the keyboard focus (editable ComboBox only).
However, a ComboBoxGadget can receive the keyboard focus even when it's not editable. Is it possible for these two events to be used for that case as well?
Thanks!
Little John
Addict
Addict
Posts: 4789
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Add #PB_EventType_Focus and #PB_EventType_LostFocus events to noneditable ComboBoxGadgets

Post by Little John »

+1

Here is a workaround.
Quin
Addict
Addict
Posts: 1133
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: Add #PB_EventType_Focus and #PB_EventType_LostFocus events to noneditable ComboBoxGadgets

Post by Quin »

Very neat workaround, Little John. I'd advocate for adding it to all gadgets that your workaround supports, as well as ListViewGadget and any others that don't support it.
Post Reply