mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-10 00:17:18 +01:00
LCL: set combobox maxlength when the control is created (bug #9439)
git-svn-id: trunk@11817 -
This commit is contained in:
parent
cede6cfe89
commit
78ef0135a5
@ -49,6 +49,7 @@ begin
|
||||
TWSCustomComboBoxClass(WidgetSetClass).SetStyle(Self, FStyle);
|
||||
TWSCustomComboBoxClass(WidgetSetClass).SetArrowKeysTraverseList(Self, FArrowKeysTraverseList);
|
||||
TWSCustomComboBoxClass(WidgetSetClass).SetReadOnly(Self, FReadOnly);
|
||||
TWSCustomComboBoxClass(WidgetSetClass).SetMaxLength(Self, FMaxLength);
|
||||
|
||||
if FSelStart <> FSelLength then begin
|
||||
ASelStart:= FSelStart;
|
||||
@ -162,8 +163,8 @@ end;
|
||||
function TCustomComboBox.GetMaxLength : integer;
|
||||
begin
|
||||
if HandleAllocated then
|
||||
fMaxLength := TWSCustomComboBoxClass(WidgetSetClass).GetMaxLength(Self);
|
||||
Result:=fMaxLength;
|
||||
FMaxLength := TWSCustomComboBoxClass(WidgetSetClass).GetMaxLength(Self);
|
||||
Result:=FMaxLength;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -711,6 +712,7 @@ begin
|
||||
SetInitialBounds(0,0,100,25);
|
||||
FItems := TStringlist.Create;
|
||||
FItemIndex:=-1;
|
||||
FMaxLength := -1;
|
||||
FDropDownCount:=8;
|
||||
FCanvas := TControlCanvas.Create;
|
||||
TControlCanvas(FCanvas).Control := Self;
|
||||
|
||||
@ -257,7 +257,7 @@ type
|
||||
FItemIndex: integer;
|
||||
FItemWidth: integer;
|
||||
FItems: TStrings;
|
||||
fMaxLength: integer;
|
||||
FMaxLength: integer;
|
||||
FOnChange: TNotifyEvent;
|
||||
FOnCloseUp: TNotifyEvent;
|
||||
FOnDrawItem: TDrawItemEvent;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user