-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdoubleclickcomment.pas
More file actions
81 lines (62 loc) · 1.69 KB
/
doubleclickcomment.pas
File metadata and controls
81 lines (62 loc) · 1.69 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
unit doubleclickcomment;
{$mode ObjFPC}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls;
type
{ TcommentForm }
TcommentForm = class(TForm)
cancelButton: TButton;
ColorDialog: TColorDialog;
COMMENT: TLabel;
editComment: TEdit;
Label1: TLabel;
Label2: TLabel;
OKbutton: TButton;
BackgroundColorButton: TShape;
TextcolorButton: TShape;
procedure cancelButtonClick(Sender: TObject);
procedure editCommentKeyPress(Sender: TObject; var Key: char);
procedure OKbuttonClick(Sender: TObject);
procedure BackgroundColorButtonClick(Sender: TObject);
procedure TextcolorButtonClick(Sender: TObject);
private
public
symbole : TObject;
end;
var
commentForm: TcommentForm;
implementation
{$R *.lfm}
uses LadderSymbol,main,usimplegraph;
{ TcommentForm }
procedure TcommentForm.cancelButtonClick(Sender: TObject);
begin
self.hide;
end;
procedure TcommentForm.editCommentKeyPress(Sender: TObject; var Key: char);
begin
if key=chr(13) then OKbuttonClick(self);
end;
procedure TcommentForm.OKbuttonClick(Sender: TObject);
begin
TComment(symbole).allias:=editComment.Text;
self.hide;
end;
procedure TcommentForm.BackgroundColorButtonClick(Sender: TObject);
begin
if ColorDialog.execute then
begin
TEvsRectangularNode(symbole).brush.Color:=ColorDialog.Color;
BackgroundColorButton.Brush.Color:=ColorDialog.Color;
end;
end;
procedure TcommentForm.TextcolorButtonClick(Sender: TObject);
begin
if ColorDialog.execute then
begin
TEvsRectangularNode(symbole).Font.Color:=ColorDialog.Color;
textColorButton.Brush.Color:=ColorDialog.Color;
end;
end;
end.