-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathForms.Dialog.pas
42 lines (31 loc) · 929 Bytes
/
Forms.Dialog.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
unit Forms.Dialog;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls,
Frames.Persistent;
type
TfrmDialog = class(TForm)
pnlFrames: TPanel;
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
private
FFrame: TfrmPersistent;
public
property Frame: TfrmPersistent read FFrame;
constructor Create(AOwner: TComponent; AFrameClass: TfrmPersistentClass); reintroduce;
end;
implementation
{$R *.dfm}
{ TfrmDialog }
constructor TfrmDialog.Create(AOwner: TComponent; AFrameClass: TfrmPersistentClass);
begin
inherited Create(AOwner);
FFrame := AFrameClass.Create(pnlFrames);
Height := FFrame.Height;
Width := FFrame.Width;
end;
procedure TfrmDialog.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
CanClose := ModalResult <> mrNone;
end;
end.