Recent

Author Topic: editable Combobox and OnEditingDone  (Read 799 times)

Weitentaaal

  • Hero Member
  • *****
  • Posts: 554
editable Combobox and OnEditingDone
« on: January 09, 2024, 07:58:24 am »
Hello,

i did not find any info about this. i create a Combobox with style csDropDown (so the user can edit the text). Now i fill some Suggestions in the Combobox, from which the user could select or input his own value. I valuate the input with the OnEditingDone event. Works fine but when the users scrolls on the Combobox then different items in the combobox will be selected, the OnEditingdone event wont fire. how can i avoid this ?. I do not want to use OnChange because it will fire to soon.

Weitentaaal

  • Hero Member
  • *****
  • Posts: 554
Re: editable Combobox and OnEditingDone
« Reply #1 on: January 09, 2024, 08:03:50 am »
Just realized there is a OnMouseWheelDown and OnMouseWheelUp event. i will just place Control.EditingDone into those.

Edit: if there is a propper Solution, please let me know.

Zvoni

  • Hero Member
  • *****
  • Posts: 2980
Re: editable Combobox and OnEditingDone
« Reply #2 on: January 09, 2024, 08:16:35 am »
Just realized there is a OnMouseWheelDown and OnMouseWheelUp event. i will just place Control.EditingDone into those.

Edit: if there is a propper Solution, please let me know.
Bad idea. What about the User using the Arrow-Keys on the Keyboard instead of the Mouse-Wheel?
Why not OnSelect-Event? Or OnCloseUp?
Since OnSelect, OnCloseUp and OnEditingDone have the same signature (TNotifyEvent) you could even use the same Handler-Procedure
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

Weitentaaal

  • Hero Member
  • *****
  • Posts: 554
Re: editable Combobox and OnEditingDone
« Reply #3 on: January 09, 2024, 02:05:43 pm »
Just realized there is a OnMouseWheelDown and OnMouseWheelUp event. i will just place Control.EditingDone into those.

Edit: if there is a propper Solution, please let me know.
Bad idea. What about the User using the Arrow-Keys on the Keyboard instead of the Mouse-Wheel?
Why not OnSelect-Event? Or OnCloseUp?
Since OnSelect, OnCloseUp and OnEditingDone have the same signature (TNotifyEvent) you could even use the same Handler-Procedure

man how did i miss that xD. i think i need to combine EditingDone and OnSelect. thanks for the hint

 

TinyPortal © 2005-2018