mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-15 12:19:13 +02:00
lcl: win32: ComboBox ItemWidth support. Issue #29149, patch by Simon Ameis/Janusz Tomczak
git-svn-id: trunk@51094 -
This commit is contained in:
parent
0246f8c565
commit
9effa4e621
@ -250,7 +250,7 @@ procedure TCustomComboBox.AdjustDropDown;
|
|||||||
var
|
var
|
||||||
Count, MinItemsWidth, MinItemsHeight: Integer;
|
Count, MinItemsWidth, MinItemsHeight: Integer;
|
||||||
begin
|
begin
|
||||||
if (not HandleAllocated) or (not DroppedDown) then exit;
|
if (not HandleAllocated) then exit;
|
||||||
Count := Items.Count;
|
Count := Items.Count;
|
||||||
if Count > DropDownCount then Count := DropDownCount;
|
if Count > DropDownCount then Count := DropDownCount;
|
||||||
if Count < 1 then Count := 1;
|
if Count < 1 then Count := 1;
|
||||||
|
@ -2982,6 +2982,7 @@ function TWin32WidgetSet.SetComboMinDropDownSize(Handle: HWND; MinItemsWidth,
|
|||||||
begin
|
begin
|
||||||
Result:= ThemeServices.ThemesEnabled and
|
Result:= ThemeServices.ThemesEnabled and
|
||||||
boolean(Windows.SendMessage(Handle, CB_SETMINVISIBLE, MinItemCount, 0));
|
boolean(Windows.SendMessage(Handle, CB_SETMINVISIBLE, MinItemCount, 0));
|
||||||
|
Result := Result and boolean(Windows.SendMessage(Handle, CB_SETDROPPEDWIDTH, MinItemsWidth, 0));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user