You've already forked lazarus-ccr
TRxDBLookupEdit,TRxDBLookupCombo - PopUpFormOptions - add new property Color and AlternateColor
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3328 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -152,9 +152,11 @@ type
|
||||
|
||||
TPopUpFormOptions = class(TPersistent)
|
||||
private
|
||||
FAlternateColor: TColor;
|
||||
FAutoFillColumns: boolean;
|
||||
FAutoSort: boolean;
|
||||
FBorderStyle: TBorderStyle;
|
||||
FColor: TColor;
|
||||
FColumns: TPopUpFormColumns;
|
||||
FDataSource: TDataSource;
|
||||
FDropDownCount: integer;
|
||||
@ -166,6 +168,7 @@ type
|
||||
FTitleStyle: TTitleStyle;
|
||||
FOwner:TPersistent;
|
||||
function GetColumns: TPopUpFormColumns;
|
||||
function IsAltColorStored: Boolean;
|
||||
procedure SetAutoFillColumns(const AValue: boolean);
|
||||
procedure SetAutoSort(const AValue: boolean);
|
||||
procedure SetColumns(const AValue: TPopUpFormColumns);
|
||||
@ -183,6 +186,9 @@ type
|
||||
procedure Assign(Source: TPersistent); override;
|
||||
property DataSource:TDataSource read FDataSource write FDataSource;
|
||||
published
|
||||
property AlternateColor: TColor read FAlternateColor write FAlternateColor stored IsAltColorStored;
|
||||
property Color: TColor read FColor write FColor default {$ifdef UseCLDefault}clDefault{$else}clWindow{$endif};
|
||||
|
||||
property AutoFillColumns:boolean read FAutoFillColumns write SetAutoFillColumns default false;
|
||||
property AutoSort:boolean read FAutoSort write SetAutoSort default false;
|
||||
property BorderStyle: TBorderStyle read FBorderStyle write FBorderStyle default bsNone;
|
||||
@ -550,6 +556,9 @@ begin
|
||||
FRowCount:=10 + ord(dgTitles in FGrid.Options)
|
||||
else
|
||||
FRowCount:=FPopUpFormOptions.DropDownCount + 2 + ord(dgTitles in FGrid.Options);
|
||||
|
||||
FGrid.Color:=FPopUpFormOptions.Color;
|
||||
FGrid.AlternateColor:=FPopUpFormOptions.AlternateColor;
|
||||
end;
|
||||
|
||||
destructor TPopUpForm.Destroy;
|
||||
@ -571,6 +580,11 @@ begin
|
||||
Result:=FColumns;
|
||||
end;
|
||||
|
||||
function TPopUpFormOptions.IsAltColorStored: Boolean;
|
||||
begin
|
||||
Result := FAlternateColor <> FColor;
|
||||
end;
|
||||
|
||||
procedure TPopUpFormOptions.SetAutoFillColumns(const AValue: boolean);
|
||||
begin
|
||||
if FAutoFillColumns=AValue then exit;
|
||||
@ -637,6 +651,8 @@ begin
|
||||
FBorderStyle:=bsNone;
|
||||
FColumns:=TPopUpFormColumns.Create(AOwner);
|
||||
FColumns.FPopUpFormOptions:=Self;
|
||||
FColor:={$ifdef UseCLDefault}clDefault{$else}clWindow{$endif};
|
||||
FAlternateColor:=FColor;
|
||||
end;
|
||||
|
||||
destructor TPopUpFormOptions.Destroy;
|
||||
@ -657,6 +673,8 @@ begin
|
||||
FTitleButtons:=TPopUpFormOptions(Source).FTitleButtons;
|
||||
FTitleStyle:=TPopUpFormOptions(Source).FTitleStyle;
|
||||
FBorderStyle:=TPopUpFormOptions(Source).FBorderStyle;
|
||||
FColor:=TPopUpFormOptions(Source).FColor;
|
||||
FAlternateColor:=TPopUpFormOptions(Source).FAlternateColor;
|
||||
end
|
||||
else
|
||||
inherited Assign(Source);
|
||||
|
Reference in New Issue
Block a user