LCL: Hide emulated TextHint in TCustomComboBox.SetItemIndex. Issue #41108, based on patch by Iluha Companets.

This commit is contained in:
Juha 2024-09-02 11:40:38 +03:00
parent cf462fa18d
commit f7ab06f51d

View File

@ -1053,7 +1053,13 @@ begin
if csLoading in ComponentState then Exit;
if HandleAllocated then
TWSCustomComboBoxClass(WidgetSetClass).SetItemIndex(Self, FItemIndex)
begin
if Val = -1 then
ShowEmulatedTextHintIfYouCan
else
HideEmulatedTextHint;
TWSCustomComboBoxClass(WidgetSetClass).SetItemIndex(Self, FItemIndex);
end
else
begin
// remember text, in case one reads text without creating handle