mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 00:40:18 +02:00
qt: take Combobox.DropDownCount into account
git-svn-id: trunk@14728 -
This commit is contained in:
parent
00d052573c
commit
8a48e510c8
@ -1159,6 +1159,7 @@ begin
|
|||||||
|
|
||||||
// create our FList helper
|
// create our FList helper
|
||||||
QtComboBox.FList := TQtComboStrings.Create(QtComboBox);
|
QtComboBox.FList := TQtComboStrings.Create(QtComboBox);
|
||||||
|
QtComboBox.setMaxVisibleItems(TCustomComboBox(AWinControl).DropDownCount);
|
||||||
|
|
||||||
Result := TLCLIntfHandle(QtComboBox);
|
Result := TLCLIntfHandle(QtComboBox);
|
||||||
end;
|
end;
|
||||||
|
@ -339,7 +339,7 @@ begin
|
|||||||
Windows.GetClientRect(FWin32List, @R);
|
Windows.GetClientRect(FWin32List, @R);
|
||||||
FEditHeight := R.Bottom;
|
FEditHeight := R.Bottom;
|
||||||
FItemHeight := Windows.SendMessage(FWin32List, CB_GETITEMHEIGHT, 0, 0);
|
FItemHeight := Windows.SendMessage(FWin32List, CB_GETITEMHEIGHT, 0, 0);
|
||||||
FDropDownCount := TComboBox(FSender).DropDownCount;
|
FDropDownCount := TCustomComboBox(FSender).DropDownCount;
|
||||||
if FDropDownCount = 0 then
|
if FDropDownCount = 0 then
|
||||||
FDropDownCount := 8;
|
FDropDownCount := 8;
|
||||||
end;
|
end;
|
||||||
|
@ -327,7 +327,6 @@ type
|
|||||||
procedure MouseUp(Button: TMouseButton; Shift:TShiftState; X, Y: Integer); override;
|
procedure MouseUp(Button: TMouseButton; Shift:TShiftState; X, Y: Integer); override;
|
||||||
function SelectItem(const AnItem: String): Boolean;
|
function SelectItem(const AnItem: String): Boolean;
|
||||||
|
|
||||||
property DropDownCount: Integer read FDropDownCount write SetDropDownCount default 8;
|
|
||||||
property ItemHeight: Integer read GetItemHeight write SetItemHeight;
|
property ItemHeight: Integer read GetItemHeight write SetItemHeight;
|
||||||
property ItemWidth: Integer read GetItemWidth write SetItemWidth;
|
property ItemWidth: Integer read GetItemWidth write SetItemWidth;
|
||||||
property MaxLength: integer read GetMaxLength write SetMaxLength default -1;
|
property MaxLength: integer read GetMaxLength write SetMaxLength default -1;
|
||||||
@ -365,6 +364,7 @@ type
|
|||||||
property ArrowKeysTraverseList: Boolean read FArrowKeysTraverseList
|
property ArrowKeysTraverseList: Boolean read FArrowKeysTraverseList
|
||||||
write SetArrowKeysTraverseList default True;
|
write SetArrowKeysTraverseList default True;
|
||||||
property Canvas: TCanvas read FCanvas;
|
property Canvas: TCanvas read FCanvas;
|
||||||
|
property DropDownCount: Integer read FDropDownCount write SetDropDownCount default 8;
|
||||||
property Items: TStrings read FItems write SetItems;
|
property Items: TStrings read FItems write SetItems;
|
||||||
property ItemIndex: integer read GetItemIndex write SetItemIndex default -1;
|
property ItemIndex: integer read GetItemIndex write SetItemIndex default -1;
|
||||||
property ReadOnly: Boolean read FReadOnly write SetReadOnly stored IsReadOnlyStored;
|
property ReadOnly: Boolean read FReadOnly write SetReadOnly stored IsReadOnlyStored;
|
||||||
|
Loading…
Reference in New Issue
Block a user