LCL: listbox: fix default value for Options

git-svn-id: trunk@55126 -
This commit is contained in:
ondrej 2017-05-30 14:54:05 +00:00
parent 9311861669
commit 48dbf5c56d
2 changed files with 4 additions and 8 deletions

View File

@ -128,11 +128,6 @@ begin
UnlockSelectionChange;
end;
function TCustomListBox.IsOptionsStored: Boolean;
begin
Result := (FOptions = [lboDrawFocusRect]);
end;
{------------------------------------------------------------------------------
procedure TCustomListBox.FinalizeWnd
------------------------------------------------------------------------------}
@ -562,7 +557,7 @@ begin
FItemIndex:=-1;
FExtendedSelect := true;
//FScrollWidth := 0;
FOptions := [lboDrawFocusRect];
FOptions := DefOptions;
FCanvas := TControlCanvas.Create;
TControlCanvas(FCanvas).Control := Self;
ParentColor := false;

View File

@ -495,6 +495,8 @@ type
{ TCustomListBox }
TCustomListBox = class(TWinControl)
private const
DefOptions = [lboDrawFocusRect];
private
FCacheValid: Boolean;
FCanvas: TCanvas;
@ -519,7 +521,6 @@ type
function GetCount: Integer;
function GetScrollWidth: Integer;
function GetTopIndex: Integer;
function IsOptionsStored: Boolean;
procedure RaiseIndexOutOfBounds(AIndex: integer);
procedure SetColumns(const AValue: Integer);
procedure SetScrollWidth(const AValue: Integer);
@ -622,7 +623,7 @@ type
property OnSelectionChange: TSelectionChangeEvent read FOnSelectionChange
write FOnSelectionChange;
property OnUTF8KeyPress;
property Options: TListBoxOptions read FOptions write FOptions stored IsOptionsStored;
property Options: TListBoxOptions read FOptions write FOptions default DefOptions;
property ParentColor default False;
property ParentFont;
property ParentShowHint;