adbgrded.pas
来自「delphi编程控件」· PAS 代码 · 共 82 行
PAS
82 行
unit adbgrded;
(*
COPYRIGHT (c) RSD Software 1997 - 98
All Rights Reserved.
*)
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls, adbgrid;
type
TFAutoGridLayoutEdit = class(TForm)
Panel1: TPanel;
Grid: TAutoDBGrid;
BFieldEditor: TButton;
BColumnCustomizing: TButton;
BOk: TButton;
BCancel: TButton;
BHelp: TButton;
procedure BFieldEditorClick(Sender: TObject);
procedure BColumnCustomizingClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
function ShowAutoGridLayoutEditor(AGridLayout : TAutoGridLayout) : Boolean;
implementation
uses adbgrfed, audbstrs, autostrs;
{$R *.DFM}
function ShowAutoGridLayoutEditor(AGridLayout : TAutoGridLayout) : Boolean;
Var
AForm : TFAutoGridLayoutEdit;
AGridOptions : TAutoGridOptions;
begin
Result := False;
AForm := TFAutoGridLayoutEdit.Create(Nil);
with AForm do begin
Grid.Repository := AGridLayout.Repository;
Grid.GridLayout.Assign(AGridLayout);
AGridOptions := AGridLayout.Options;
Grid.GridLayout.Options := Grid.GridLayout.Options + [agoColumnDrag];
Caption := LoadStr(ACDB_GRIDCUSTOMIZING) + AGridLayout.Owner.Name;
ShowModal;
if(ModalResult = mrOk) then begin
AGridLayout.Assign(Grid.GridLayout);
AGridLayout.Options := AGridOptions;
Result := True;
end;
end;
AForm.Free;
end;
procedure TFAutoGridLayoutEdit.BFieldEditorClick(Sender: TObject);
begin
ShowAutoGridFieldsEditor(Grid.GridLayout);
end;
procedure TFAutoGridLayoutEdit.BColumnCustomizingClick(Sender: TObject);
begin
Grid.ColumnsCustomizing;
end;
procedure TFAutoGridLayoutEdit.FormCreate(Sender: TObject);
begin
BOK.Caption := LoadStr(ACB_OK);
BCancel.Caption := LoadStr(ACB_CANCEL);
BHelp.Caption := LoadStr(ACB_HELP);
BFieldEditor.Caption := LoadStr(ACDB_GRIDFIELDEDITOR);
BColumnCustomizing.Caption := LoadStr(ACDB_FIELDCHOOSER);
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?