mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 16:41:28 +02:00
win32: postpone combobox CBN_CLOSEUP message to let CBN_SELCHANGE to be handled first (fixes bug #0013189)
git-svn-id: trunk@18723 -
This commit is contained in:
parent
2298d92d57
commit
ff0c1822d1
@ -1381,11 +1381,19 @@ begin
|
||||
CBN_SELCHANGE is sent when the user changes the text by
|
||||
selecting in the list, but before text is actually changed.
|
||||
itemindex is updated, so set text manually }
|
||||
CBN_SELCHANGE: begin
|
||||
CBN_SELCHANGE:
|
||||
begin
|
||||
UpdateComboBoxText(TCustomComboBox(lWinControl));
|
||||
SendSimpleMessage(lWinControl, LM_CHANGED);
|
||||
LMessage.Msg := LM_SELCHANGE;
|
||||
end;
|
||||
CBN_CLOSEUP:
|
||||
begin
|
||||
// according to msdn CBN_CLOSEUP can happen before CBN_SELCHANGE and
|
||||
// unfortunately it is simple truth. but we need correct order in the LCL
|
||||
PostMessage(lWinControl.Handle, CN_COMMAND, WParam, LParam);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user