blob: 3541a935a9ad3c1bd846576779e98e853220544f (
plain)
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
|
{%mainunit fpg_dialogs.pas}
{$IFDEF read_interface}
{ TfpgSelectDirDialog }
TfpgSelectDirDialog = class(TfpgBaseDialog)
private
lblTitle: TfpgLabel;
edDirectory: TfpgEdit;
tv: TfpgTreeView;
function GetDirectory: TfpgString;
public
constructor Create(AOwner: TComponent); override;
property Directory: TfpgString read GetDirectory;
end;
{$ENDIF read_interface}
{$IFDEF read_implementation}
function TfpgSelectDirDialog.GetDirectory: TfpgString;
begin
//
end;
constructor TfpgSelectDirDialog.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
lblTitle := CreateLabel(self, 8, 8, rsEnterNewDirectory);
edDirectory := CreateEdit(self, 8, 28, 270, 0);
edDirectory.Anchors := [anLeft, anTop, anRight];
tv := TfpgTreeView.Create(self);
with tv do
begin
Name := 'tv';
SetPosition(8, 28, 270, 250);
end;
// reposition buttons
btnCancel.Left := Width-FDefaultButtonWidth-FSpacing;
btnCancel.Top := Height - FSpacing - btnCancel.Height;
btnOK.Left := btnCancel.Left-FDefaultButtonWidth-FSpacing;
btnOK.Top := btnCancel.Top;
// now reset tab order
edDirectory.TabOrder := 1;
btnOK.TabOrder := 2;
btnCancel.TabOrder := 3;
end;
{$ENDIF read_implementation}
|