forked from thargor6/mb3d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathColorOptionForm.pas
56 lines (47 loc) · 1.15 KB
/
ColorOptionForm.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
unit ColorOptionForm;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls;
type
TFColorOptions = class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Image1: TImage;
Image2: TImage;
Image3: TImage;
Image4: TImage;
Image5: TImage;
Image6: TImage;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
iOption: Integer;
end;
var
FColorOptions: TFColorOptions;
implementation
{$R *.dfm}
procedure TFColorOptions.Button1Click(Sender: TObject);
begin
ModalResult := (Sender as TButton).Tag;
end;
procedure TFColorOptions.FormCreate(Sender: TObject);
var i: Integer;
can: TCanvas;
begin
for i := 1 to 6 do
begin
can := (FindComponent('Image' + IntToStr(i)) as TImage).Canvas;
can.Brush.Color := clBtnFace;
can.FillRect(can.ClipRect);
can.Brush.Color := 0;
can.FillRect(Rect(1, 0, 63, 13));
end;
end;
end.