Построение графика
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.
|
Загрузить исходный код проекта
Загрузить библиотеку с компонентами
|