⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testgrf.pas

📁 Delphi高级开发指南是开发程序的好帮手
💻 PAS
字号:
unit TestGrF;

interface

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

type
  TForm1 = class(TForm)
    ColorDialog1: TColorDialog;
    FontDialog1: TFontDialog;
    Image1: TImage;
    Panel1: TPanel;
    Button1: TButton;
    Button2: TButton;
    CheckBox1: TCheckBox;
    Button3: TButton;
    DdhGraph1: TDdhGraph;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
  ColorDialog1.Color := DdhGraph1.Color;
  if ColorDialog1.Execute then
    DdhGraph1.Color := ColorDialog1.Color;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  FontDialog1.Font := DdhGraph1.Font;
  if FontDialog1.Execute then
    DdhGraph1.Font := FontDialog1.Font;
end;

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
  if CheckBox1.Checked then
    DdhGraph1.BorderStyle := bsSingle
  else
    DdhGraph1.BorderStyle := bsNone;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  ColorDialog1.Color := DdhGraph1.LinesColor;
  if ColorDialog1.Execute then
    DdhGraph1.LinesColor := ColorDialog1.Color;
end;

end.

⌨️ 快捷键说明

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