mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 14:29:27 +02:00
implemented TCustomComboBox.AutoComplete (issue #1706)
git-svn-id: trunk@8752 -
This commit is contained in:
parent
fb25475cdc
commit
be77c68da7
@ -542,6 +542,11 @@ begin
|
||||
Result:=FDroppedDown;
|
||||
end;
|
||||
|
||||
function TCustomComboBox.GetAutoComplete: boolean;
|
||||
begin
|
||||
Result := cbactEnabled in AutoCompleteText;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function TCustomComboBox.GetItemWidth: Integer;
|
||||
|
||||
@ -553,6 +558,15 @@ begin
|
||||
Result:=FItemWidth;
|
||||
end;
|
||||
|
||||
procedure TCustomComboBox.SetAutoComplete(const AValue: boolean);
|
||||
begin
|
||||
if (cbactEnabled in FAutoCompleteText)=AValue then exit;
|
||||
if AValue then
|
||||
AutoCompleteText := AutoCompleteText + [cbactEnabled]
|
||||
else
|
||||
AutoCompleteText := AutoCompleteText - [cbactEnabled]
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function TCustomComboBox.GetDroppedDown: Boolean;
|
||||
|
||||
|
@ -256,8 +256,10 @@ type
|
||||
FStyle: TComboBoxStyle;
|
||||
FArrowKeysTraverseList: Boolean;
|
||||
FReturnArrowState: Boolean; //used to return the state of arrow keys from termporary change
|
||||
function GetAutoComplete: boolean;
|
||||
function GetDroppedDown: Boolean;
|
||||
function GetItemWidth: Integer;
|
||||
procedure SetAutoComplete(const AValue: boolean);
|
||||
procedure SetItemWidth(const AValue: Integer);
|
||||
procedure SetItems(Value: TStrings);
|
||||
procedure LMDrawListItem(var TheMessage: TLMDrawListItem); message LM_DrawListItem;
|
||||
@ -329,6 +331,7 @@ type
|
||||
property DroppedDown: Boolean read GetDroppedDown write SetDroppedDown;
|
||||
procedure MeasureItem(Index: Integer; var TheHeight: Integer); virtual;
|
||||
procedure SelectAll;
|
||||
property AutoComplete: boolean read GetAutoComplete write SetAutoComplete;
|
||||
property AutoCompleteText: TComboBoxAutoCompleteText
|
||||
read FAutoCompleteText write FAutoCompleteText;
|
||||
property AutoDropDown: Boolean
|
||||
|
Loading…
Reference in New Issue
Block a user