6 ConstantsClass
, ResourcesClass
,
7 Classes
, Controls
, Forms
, StdCtrls
;
13 TTagEdit
= class(TForm
)
15 pButtons
: array [0..3] of TRadioButton
;
16 pChange
, pCancel
: TButton
;
18 constructor Create(AOwner
: TComponent
); override;
19 function ShowBox(var Input
: Integer): Boolean; virtual;
24 // ************************************************************************** //
25 // * TTagEdit implementation * //
26 // ************************************************************************** //
28 constructor TTagEdit
.Create(AOwner
: TComponent
);
32 inherited CreateNew(AOwner
, 0);
33 Position
:= poDesktopCenter
;
36 BorderStyle
:= bsDialog
;
37 pChange
:= TButton
.Create(Self
);
41 Caption
:= FL_EDIT_OK
;
49 pCancel
:= TButton
.Create(Self
);
53 Caption
:= FL_EDIT_CANCEL
;
58 ModalResult
:= mrCancel
;
63 pButtons
[i
] := TRadioButton
.Create(Self
);
67 Caption
:= DESC_TAG
[i
];
76 pButtons
[i
] := TRadioButton
.Create(Self
);
80 Caption
:= DESC_TAG
[i
];
82 Top
:= (23 * (i
- 2)) + 7;
89 function TTagEdit
.ShowBox(var Input
: Integer): Boolean;
94 if (Input
< 0) or not(Input
< Length(pButtons
)) then Exit
;
95 pButtons
[Input
].Checked
:= True;
96 if (Self
.ShowModal
= mrOk
) then
98 for i
:= 0 to (Length(pButtons
) - 1) do
99 if pButtons
[i
].Checked
then