merge r51094 #9effa4e621: lcl: win32: ComboBox ItemWidth support. Issue #29149, patch by Simon Ameis/Janusz Tomczak

git-svn-id: branches/fixes_1_6@51095 -
This commit is contained in:
ondrej 2015-12-31 10:10:25 +00:00
parent 51ce3a5ea1
commit 21578de506
2 changed files with 2 additions and 1 deletions

View File

@ -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;

View File

@ -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;
{------------------------------------------------------------------------------