-
Notifications
You must be signed in to change notification settings - Fork 2
/
MaskHlpUnit.pas
executable file
·68 lines (57 loc) · 1.58 KB
/
MaskHlpUnit.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
57
58
59
60
61
62
63
64
65
66
67
68
unit MaskHlpUnit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TMaskRulesForm = class(TForm)
OKBtn: TButton;
MaskHelpMemo: TMemo;
procedure FormResize(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MaskRulesForm: TMaskRulesForm;
procedure ShowMaskHlp;
implementation uses MPGTools;
{$R *.DFM}
procedure ShowMaskHlp;
begin
with TMaskRulesForm.Create(Application) do
try
ShowModal;
finally
Free;
end;
end;
procedure TMaskRulesForm.FormResize(Sender: TObject);
begin
MaskHelpMemo.Width := ClientWidth - 0;
MaskHelpMemo.Height := ClientHeight - 2 - OKBtn.Height;
OKBtn.Left := ClientWidth - OKBtn.Width - 0;
OKBtn.Top := ClientHeight - OKBtn.Height - 0;
end;
procedure TMaskRulesForm.FormCreate(Sender: TObject);
var i : integer;
begin
with MaskHelpMemo.Lines do
begin
Clear;
Add('%<IDïîëÿ>[,<ÂûðàâíèâàíèåL/R>][,<Äëèíà>][,<ÇàïîëíÿþùèéÑèìâîë>]%');
Add(' Íàïðèìåð: %FNS,L,12, % - ïîëó÷èòñÿ êîðîòêîå (DOS) èìÿ,');
Add(' äîïîëíåííîå ïðîáåëàìè ñïðàâà äî äëèíû â 12 ñèìâîëîâ');
Add('-------------------------------------------------------------------');
Add('*** ID ïîëåé :');
Add('');
for i := 0 to Macros.Count-1 do
if (Macros.Items[i].ShortName<>'' )
and(Macros.Items[i].ShortName[1]<>' ')
and(Macros.Items[i].ValueProc<>nil) then
MaskHelpMemo.lines.Add(PadLeft(macros.items[i].ShortName,5,' ')+#9#9+macros.Items[i].Description);
end;
end;
end.