diff --git a/lcl/interfaces/qt/qtwsstdctrls.pp b/lcl/interfaces/qt/qtwsstdctrls.pp index 0b1dfb1979..41b67871fb 100644 --- a/lcl/interfaces/qt/qtwsstdctrls.pp +++ b/lcl/interfaces/qt/qtwsstdctrls.pp @@ -1159,6 +1159,7 @@ begin // create our FList helper QtComboBox.FList := TQtComboStrings.Create(QtComboBox); + QtComboBox.setMaxVisibleItems(TCustomComboBox(AWinControl).DropDownCount); Result := TLCLIntfHandle(QtComboBox); end; diff --git a/lcl/interfaces/win32/win32listsl.inc b/lcl/interfaces/win32/win32listsl.inc index 51bfd497c7..84651fe610 100644 --- a/lcl/interfaces/win32/win32listsl.inc +++ b/lcl/interfaces/win32/win32listsl.inc @@ -339,7 +339,7 @@ begin Windows.GetClientRect(FWin32List, @R); FEditHeight := R.Bottom; FItemHeight := Windows.SendMessage(FWin32List, CB_GETITEMHEIGHT, 0, 0); - FDropDownCount := TComboBox(FSender).DropDownCount; + FDropDownCount := TCustomComboBox(FSender).DropDownCount; if FDropDownCount = 0 then FDropDownCount := 8; end; diff --git a/lcl/stdctrls.pp b/lcl/stdctrls.pp index 0e365d6a51..7b84382453 100644 --- a/lcl/stdctrls.pp +++ b/lcl/stdctrls.pp @@ -327,7 +327,6 @@ type procedure MouseUp(Button: TMouseButton; Shift:TShiftState; X, Y: Integer); override; function SelectItem(const AnItem: String): Boolean; - property DropDownCount: Integer read FDropDownCount write SetDropDownCount default 8; property ItemHeight: Integer read GetItemHeight write SetItemHeight; property ItemWidth: Integer read GetItemWidth write SetItemWidth; property MaxLength: integer read GetMaxLength write SetMaxLength default -1; @@ -365,6 +364,7 @@ type property ArrowKeysTraverseList: Boolean read FArrowKeysTraverseList write SetArrowKeysTraverseList default True; property Canvas: TCanvas read FCanvas; + property DropDownCount: Integer read FDropDownCount write SetDropDownCount default 8; property Items: TStrings read FItems write SetItems; property ItemIndex: integer read GetItemIndex write SetItemIndex default -1; property ReadOnly: Boolean read FReadOnly write SetReadOnly stored IsReadOnlyStored;