You've already forked lazarus-ccr
TRxDBLookupCombo: fix modify TPopUpFormColumns
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2673 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -4884,8 +4884,7 @@ begin
|
|||||||
if FCommand = AValue then
|
if FCommand = AValue then
|
||||||
exit;
|
exit;
|
||||||
FCommand := AValue;
|
FCommand := AValue;
|
||||||
Changed(true);
|
Changed(False);
|
||||||
/// Changed(False);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxDBGridKeyStroke.SetShortCut(const AValue: TShortCut);
|
procedure TRxDBGridKeyStroke.SetShortCut(const AValue: TShortCut);
|
||||||
@ -4894,8 +4893,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
FShortCut := AValue;
|
FShortCut := AValue;
|
||||||
Menus.ShortCutToKey(FShortCut, FKey, FShift);
|
Menus.ShortCutToKey(FShortCut, FKey, FShift);
|
||||||
Changed(true);
|
Changed(False);
|
||||||
/// Changed(False);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRxDBGridKeyStroke.GetDisplayName: string;
|
function TRxDBGridKeyStroke.GetDisplayName: string;
|
||||||
@ -4911,9 +4909,6 @@ begin
|
|||||||
Command := TRxDBGridKeyStroke(Source).Command;
|
Command := TRxDBGridKeyStroke(Source).Command;
|
||||||
ShortCut := TRxDBGridKeyStroke(Source).ShortCut;
|
ShortCut := TRxDBGridKeyStroke(Source).ShortCut;
|
||||||
Enabled := TRxDBGridKeyStroke(Source).Enabled;
|
Enabled := TRxDBGridKeyStroke(Source).Enabled;
|
||||||
|
|
||||||
{ Shift := TSynEditKeyStroke(Source).Shift;
|
|
||||||
Shift2 := TSynEditKeyStroke(Source).Shift2; }
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
inherited Assign(Source);
|
inherited Assign(Source);
|
||||||
|
@ -621,7 +621,7 @@ begin
|
|||||||
Glyph.Assign(P);
|
Glyph.Assign(P);
|
||||||
P.Free;
|
P.Free;
|
||||||
ButtonWidth:=15;
|
ButtonWidth:=15;
|
||||||
FPopUpFormOptions:=TPopUpFormOptions.Create;
|
FPopUpFormOptions:=TPopUpFormOptions.Create(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TRxCustomDBLookupEdit.Destroy;
|
destructor TRxCustomDBLookupEdit.Destroy;
|
||||||
@ -1562,7 +1562,7 @@ begin
|
|||||||
FFieldList := TStringList.Create;
|
FFieldList := TStringList.Create;
|
||||||
FValuesList:= TStringList.Create;
|
FValuesList:= TStringList.Create;
|
||||||
FLocateObject:=CreateLocate(nil);
|
FLocateObject:=CreateLocate(nil);
|
||||||
FPopUpFormOptions:=TPopUpFormOptions.Create;
|
FPopUpFormOptions:=TPopUpFormOptions.Create(Self);
|
||||||
//Lookup
|
//Lookup
|
||||||
FLookupDataLink:=TLookupSourceLink.Create;
|
FLookupDataLink:=TLookupSourceLink.Create;
|
||||||
// FLookupDataLink.FDataControl:=Self;
|
// FLookupDataLink.FDataControl:=Self;
|
||||||
|
@ -136,12 +136,14 @@ type
|
|||||||
|
|
||||||
{ TPopUpFormColumns }
|
{ TPopUpFormColumns }
|
||||||
|
|
||||||
TPopUpFormColumns = class(TCollection)
|
TPopUpFormColumns = class(TOwnedCollection)
|
||||||
private
|
private
|
||||||
FPopUpFormOptions: TPopUpFormOptions;
|
FPopUpFormOptions: TPopUpFormOptions;
|
||||||
function GetPopUpColumn(Index: Integer): TPopUpColumn;
|
function GetPopUpColumn(Index: Integer): TPopUpColumn;
|
||||||
procedure SetPopUpColumn(Index: Integer; const AValue: TPopUpColumn);
|
procedure SetPopUpColumn(Index: Integer; const AValue: TPopUpColumn);
|
||||||
public
|
public
|
||||||
|
Constructor Create(AOwner: TPersistent);
|
||||||
|
procedure Assign(Source: TPersistent); override;
|
||||||
property PopUpFormOptions:TPopUpFormOptions read FPopUpFormOptions write FPopUpFormOptions;
|
property PopUpFormOptions:TPopUpFormOptions read FPopUpFormOptions write FPopUpFormOptions;
|
||||||
property Items[Index: Integer]: TPopUpColumn read GetPopUpColumn write SetPopUpColumn; default;
|
property Items[Index: Integer]: TPopUpColumn read GetPopUpColumn write SetPopUpColumn; default;
|
||||||
end;
|
end;
|
||||||
@ -162,6 +164,7 @@ type
|
|||||||
FShowTitles: boolean;
|
FShowTitles: boolean;
|
||||||
FTitleButtons: boolean;
|
FTitleButtons: boolean;
|
||||||
FTitleStyle: TTitleStyle;
|
FTitleStyle: TTitleStyle;
|
||||||
|
FOwner:TPersistent;
|
||||||
function GetColumns: TPopUpFormColumns;
|
function GetColumns: TPopUpFormColumns;
|
||||||
procedure SetAutoFillColumns(const AValue: boolean);
|
procedure SetAutoFillColumns(const AValue: boolean);
|
||||||
procedure SetAutoSort(const AValue: boolean);
|
procedure SetAutoSort(const AValue: boolean);
|
||||||
@ -172,8 +175,10 @@ type
|
|||||||
procedure SetShowTitles(const AValue: boolean);
|
procedure SetShowTitles(const AValue: boolean);
|
||||||
procedure SetTitleButtons(const AValue: boolean);
|
procedure SetTitleButtons(const AValue: boolean);
|
||||||
procedure SetTitleStyle(const AValue: TTitleStyle);
|
procedure SetTitleStyle(const AValue: TTitleStyle);
|
||||||
|
protected
|
||||||
|
function GetOwner: TPersistent; dynamic;
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create(AOwner:TPersistent);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure Assign(Source: TPersistent); override;
|
procedure Assign(Source: TPersistent); override;
|
||||||
property DataSource:TDataSource read FDataSource write FDataSource;
|
property DataSource:TDataSource read FDataSource write FDataSource;
|
||||||
@ -615,8 +620,14 @@ begin
|
|||||||
FTitleStyle:=AValue;
|
FTitleStyle:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TPopUpFormOptions.Create;
|
function TPopUpFormOptions.GetOwner: TPersistent;
|
||||||
begin
|
begin
|
||||||
|
Result:=FOwner;
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TPopUpFormOptions.Create(AOwner: TPersistent);
|
||||||
|
begin
|
||||||
|
FOwner:=AOwner;
|
||||||
inherited Create;
|
inherited Create;
|
||||||
FAutoSort:=false;
|
FAutoSort:=false;
|
||||||
FDropDownCount:=8;
|
FDropDownCount:=8;
|
||||||
@ -626,7 +637,7 @@ begin
|
|||||||
FTitleButtons:=false;
|
FTitleButtons:=false;
|
||||||
FTitleStyle:=tsLazarus;
|
FTitleStyle:=tsLazarus;
|
||||||
FBorderStyle:=bsNone;
|
FBorderStyle:=bsNone;
|
||||||
FColumns:=TPopUpFormColumns.Create(TPopUpColumn);
|
FColumns:=TPopUpFormColumns.Create(AOwner);
|
||||||
FColumns.FPopUpFormOptions:=Self;
|
FColumns.FPopUpFormOptions:=Self;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -814,6 +825,27 @@ begin
|
|||||||
Items[Index].Assign( AValue );
|
Items[Index].Assign( AValue );
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
constructor TPopUpFormColumns.Create(AOwner: TPersistent);
|
||||||
|
begin
|
||||||
|
inherited Create(AOwner, TPopUpColumn);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TPopUpFormColumns.Assign(Source: TPersistent);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
if Source is TPopUpFormColumns then
|
||||||
|
begin
|
||||||
|
Clear;
|
||||||
|
for i := 0 to TPopUpFormColumns(Source).Count-1 do
|
||||||
|
begin
|
||||||
|
with Add do
|
||||||
|
Assign(TPopUpFormColumns(Source)[i]);
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
inherited Assign(Source);
|
||||||
|
end;
|
||||||
|
|
||||||
{ TPopUpGrid }
|
{ TPopUpGrid }
|
||||||
|
|
||||||
procedure TPopUpGrid.ClearFind;
|
procedure TPopUpGrid.ClearFind;
|
||||||
|
Reference in New Issue
Block a user