unit1.pas

来自「很不错的Delphi界面Design希望对你有所帮助」· PAS 代码 · 共 80 行

PAS
80
字号
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, fcButton, fcImgBtn, fcShapeBtn, MBSImage, StdCtrls,
  fcimagepanel, fcImager;

type
  TForm1 = class(TForm)
    fcShapeBtn1: TfcShapeBtn;
    Panel1: TPanel;
    fcShapeBtn2: TfcShapeBtn;
    fcShapeBtn3: TfcShapeBtn;
    Panel2: TPanel;
    Panel3: TPanel;
    Panel4: TPanel;
    Shape1: TShape;
    Shape2: TShape;
    Shape3: TShape;
    Shape5: TShape;
    Shape6: TShape;
    Shape7: TShape;
    Shape8: TShape;
    Shape9: TShape;
    Shape10: TShape;
    Shape11: TShape;
    Shape12: TShape;
    Shape4: TShape;
    procedure fcShapeBtn1Click(Sender: TObject);
    procedure fcShapeBtn2Click(Sender: TObject);
    procedure fcShapeBtn3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.fcShapeBtn1Click(Sender: TObject);
begin
  Panel1.Visible:=True;
  Panel2.Visible:=False;
  Panel3.Visible:=False;
  fcShapeBtn1.Color:=clBackground;
  fcShapeBtn2.Color:=clSkyBlue;
  fcShapeBtn3.Color:=clSkyBlue;
end;

procedure TForm1.fcShapeBtn2Click(Sender: TObject);
begin
  Panel2.Visible:=True;
  Panel1.Visible:=False;
  Panel3.Visible:=False;
  fcShapeBtn1.Color:=clSkyBlue;
  fcShapeBtn2.Color:=clBlue;
  fcShapeBtn3.Color:=clSkyBlue;
end;

procedure TForm1.fcShapeBtn3Click(Sender: TObject);
begin
  Panel3.Visible:=True;
  Panel1.Visible:=False;
  Panel2.Visible:=False;
  fcShapeBtn1.Color:=clSkyBlue;
  fcShapeBtn2.Color:=clSkyBlue;
  fcShapeBtn3.Color:=clYellow;
end;



end.

⌨️ 快捷键说明

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