forked from geraldholdsworth/DiscImageManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChangeInterleaveUnit.pas
72 lines (55 loc) · 1.84 KB
/
ChangeInterleaveUnit.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
69
70
71
unit ChangeInterleaveUnit;
{$mode objfpc}{$H+}
interface
uses
Classes,SysUtils,Forms,Controls,Graphics,Dialogs,GJHCustomComponents,ExtCtrls,
StdCtrls;
type
{ TChangeInterleaveForm }
TChangeInterleaveForm = class(TForm)
cb_NewMethod: TComboBox;
CurrentLabel: TLabel;
NewLabel: TLabel;
lb_Current: TLabel;
OKButton,
CancelButton: TGJHButton;
procedure FormCreate(Sender: TObject);
procedure FormPaint(Sender: TObject);
private
public
end;
var
ChangeInterleaveForm: TChangeInterleaveForm;
implementation
uses MainUnit;
{$R *.lfm}
{ TChangeInterleaveForm }
{------------------------------------------------------------------------------}
//Tile the form
{------------------------------------------------------------------------------}
procedure TChangeInterleaveForm.FormPaint(Sender: TObject);
begin
MainForm.FileInfoPanelPaint(Sender);
end;
{------------------------------------------------------------------------------}
//Create the form
{------------------------------------------------------------------------------}
procedure TChangeInterleaveForm.FormCreate(Sender: TObject);
var
ratio : Real;
begin
ratio:=PixelsPerInch/DesignTimePPI;
//Create the buttons
CancelButton:=MainForm.CreateButton(ChangeInterleaveForm as TControl,
'Cancel',False,Round(8*ratio),
cb_NewMethod.Top+cb_NewMethod.Height+Round(16*ratio),
mrCancel);
OKButton:=MainForm.CreateButton(ChangeInterleaveForm as TControl,'OK',True,
CancelButton.Left+CancelButton.Width+Round(8*ratio),
cb_NewMethod.Top+cb_NewMethod.Height+Round(12*ratio),
mrOK);
//Re-adjust the form size
Height:=OKButton.Top+OKButton.Height+Round(8*ratio);
Width:=OKButton.Left+OKButton.Width+Round(8*ratio);
end;
end.