From 21578de5068b8f7b90dd223db9de9ca5540f9d0d Mon Sep 17 00:00:00 2001 From: ondrej Date: Thu, 31 Dec 2015 10:10:25 +0000 Subject: [PATCH] merge r51094 #9effa4e621: lcl: win32: ComboBox ItemWidth support. Issue #29149, patch by Simon Ameis/Janusz Tomczak git-svn-id: branches/fixes_1_6@51095 - --- lcl/include/customcombobox.inc | 2 +- lcl/interfaces/win32/win32winapi.inc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lcl/include/customcombobox.inc b/lcl/include/customcombobox.inc index 8a97012f10..149eb62605 100644 --- a/lcl/include/customcombobox.inc +++ b/lcl/include/customcombobox.inc @@ -250,7 +250,7 @@ procedure TCustomComboBox.AdjustDropDown; var Count, MinItemsWidth, MinItemsHeight: Integer; begin - if (not HandleAllocated) or (not DroppedDown) then exit; + if (not HandleAllocated) then exit; Count := Items.Count; if Count > DropDownCount then Count := DropDownCount; if Count < 1 then Count := 1; diff --git a/lcl/interfaces/win32/win32winapi.inc b/lcl/interfaces/win32/win32winapi.inc index 3faa3e4e42..305e46b249 100644 --- a/lcl/interfaces/win32/win32winapi.inc +++ b/lcl/interfaces/win32/win32winapi.inc @@ -3056,6 +3056,7 @@ function TWin32WidgetSet.SetComboMinDropDownSize(Handle: HWND; MinItemsWidth, begin Result:= ThemeServices.ThemesEnabled and boolean(Windows.SendMessage(Handle, CB_SETMINVISIBLE, MinItemCount, 0)); + Result := Result and boolean(Windows.SendMessage(Handle, CB_SETDROPPEDWIDTH, MinItemsWidth, 0)); end; {------------------------------------------------------------------------------