On 05/23/2017 03:27 PM, kapibara via Lazarus wrote:
On 05/23/2017 09:18 AM, zeljko wrote:
It's normal. If you click onto listbox (OnMouseDown of listbox
triggers), TEdit looses focus and triggers OnExit()
Thanks for the reply.
Yes, on Windows, Lazarus and Delphi 7 behave the same. Except that
Delphi 7 doesn't have the ListBox.SelectionChange event:
Lazarus Win platform: Edit.Exit always fires before ListBox.OnClick (and
OnSelectionChange), no matter if the ListBox item is selected or not.
Good. Though I would not expect SelectionChange to fired since there is
no change in selection?
Problem is with Lazarus Linux GTK2. Events behave the *opposite* to
Windows Lazarus and Delphi 7:
1) SelectionChange does not fire when clicking an already selected item.
I might be wrong, but thats good I think and the windows implementation
bad?
2) Edit.Exit fires BEFORE ListBox.OnClick if selecting and already
selected ListBox item. Good.
3) Edit.Exit fires AFTER ListBox.SelectionChange and ListBox.OnClick if
selecting a different ListBox item than the currently selected one. Bad.
So the behaviour is inconsistent between platforms, and also
inconsistent within the same control (TListBox) depending on what item
is selected.
Please open an issue about it and I'll take a look on it.
zeljko
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus-ide.org/listinfo/lazarus