adbpaned.pas

来自「delphi编程控件」· PAS 代码 · 共 78 行

PAS
78
字号
unit adbpaned;
(*
 COPYRIGHT (c) RSD Software 1997 - 98
 All Rights Reserved.
*)


interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ExtCtrls, StdCtrls, adbpanel;

type
  TFAutoPanelLayoutEdit = class(TForm)
    Panel1: TPanel;
    BFieldEditor: TButton;
    BColumnCustomizing: TButton;
    BOk: TButton;
    BCancel: TButton;
    BHelp: TButton;
    Panel: TAutoDBPanel;
    procedure BFieldEditorClick(Sender: TObject);
    procedure BColumnCustomizingClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;


function ShowAutoPanelLayoutEditor(APanelLayout : TAutoPanelLayout) : Boolean;

implementation
uses adbpnfed, autostrs, audbstrs;

{$R *.DFM}
function ShowAutoPanelLayoutEditor(APanelLayout : TAutoPanelLayout) : Boolean;
Var
  AForm : TFAutoPanelLayoutEdit;
begin
  Result := False;
  AForm := TFAutoPanelLayoutEdit.Create(Nil);
  with AForm do begin
    Caption := LoadStr(ACDB_PANELCUSTOMIZING) + APanelLayout.Owner.Name;
    Panel.Repository := APanelLayout.Repository;
    Panel.PanelLayout.Assign(APanelLayout);
    ShowModal;
    if(ModalResult = mrOk) then begin
      APanelLayout.Assign(Panel.PanelLayout);
      Result := True;
    end;
  end;
  AForm.Free;
end;

procedure TFAutoPanelLayoutEdit.BFieldEditorClick(Sender: TObject);
begin
  ShowAutoPanelFieldsEditor(Panel.PanelLayout);
end;

procedure TFAutoPanelLayoutEdit.BColumnCustomizingClick(Sender: TObject);
begin
  Panel.ControlsCustomizing;
end;

procedure TFAutoPanelLayoutEdit.FormCreate(Sender: TObject);
begin
  BOK.Caption := LoadStr(ACB_OK);
  BCancel.Caption := LoadStr(ACB_CANCEL);
  BHelp.Caption := LoadStr(ACB_HELP);
  BFieldEditor.Caption := LoadStr(ACDB_PANELFIELDEDITOR);
  BColumnCustomizing.Caption := LoadStr(ACDB_FIELDCHOOSER);
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?