align.pas

来自「formContainer for delphi,是一个delphi form动」· PAS 代码 · 共 72 行

PAS
72
字号
unit Align;

interface

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

type
  TFormAlign = class(TFormExpertWindow)
    RadioButtonfcfaDefault: TRadioButton;
    RadioButtonfcfaCenter: TRadioButton;
    RadioButtonfcfaClient: TRadioButton;
    RadioButtonfcfaTopLeft: TRadioButton;
    RadioButtonfcfaNone: TRadioButton;
    Label1: TLabel;
    RadioButtonfcfaMainFormCenter: TRadioButton;
    procedure FormShow(Sender: TObject);
  private
  protected
    procedure Apply; override;
    procedure GoToNext; override;
  public
  end;

var
  FormAlign: TFormAlign;

implementation

uses TransExpert, FormCont;

{$R *.DFM}

procedure TFormAlign.Apply;
begin
  if RadioButtonfcfaDefault            .Checked
  then FormTransitionsExpert.Align := fcfaDefault
  else if RadioButtonfcfaNone          .Checked
  then FormTransitionsExpert.Align := fcfaNone
  else if RadioButtonfcfaCenter        .Checked
  then FormTransitionsExpert.Align := fcfaCenter
  else if RadioButtonfcfaClient        .Checked
  then FormTransitionsExpert.Align := fcfaClient
  else if RadioButtonfcfaTopLeft       .Checked
  then FormTransitionsExpert.Align := fcfaTopLeft
  else if RadioButtonfcfaMainFormCenter.Checked
  then FormTransitionsExpert.Align := fcfaMainFormCenter;
end;

procedure TFormAlign.GoToNext;
begin
  FormTransitionsExpert.GoToPicture;
end;

procedure TFormAlign.FormShow(Sender: TObject);
begin
  inherited;

  case FormTransitionsExpert.Align of
    fcfaDefault       : RadioButtonfcfaDefault       .Checked := True;
    fcfaNone          : RadioButtonfcfaNone          .Checked := True;
    fcfaCenter        : RadioButtonfcfaCenter        .Checked := True;
    fcfaClient        : RadioButtonfcfaClient        .Checked := True;
    fcfaTopLeft       : RadioButtonfcfaTopLeft       .Checked := True;
    fcfaMainFormCenter: RadioButtonfcfaMainFormCenter.Checked := True;
  end;
end;


end.

⌨️ 快捷键说明

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