qt: take Combobox.DropDownCount into account

git-svn-id: trunk@14728 -
This commit is contained in:
paul 2008-04-02 09:29:47 +00:00
parent 00d052573c
commit 8a48e510c8
3 changed files with 3 additions and 2 deletions

View File

@ -1159,6 +1159,7 @@ begin
// create our FList helper
QtComboBox.FList := TQtComboStrings.Create(QtComboBox);
QtComboBox.setMaxVisibleItems(TCustomComboBox(AWinControl).DropDownCount);
Result := TLCLIntfHandle(QtComboBox);
end;

View File

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

View File

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