Chapter 08 - Project DockPage |
Project Structure
| DockPage.dpr |
program DockPage;
uses
Forms,
DockPF in 'DockPF.pas' ,
EditForm in 'EditForm.pas' ,
CalForm in 'CalForm.pas' ;
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm2, Form2);
Application.CreateForm(TForm3, Form3);
Application.Run;
end.
| DockPF.pas |
unit DockPF;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComCtrls, ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Splitter1: TSplitter;
Memo1: TMemo;
Panel1: TPanel;
ListBox1: TListBox;
PageControl1: TPageControl;
TabSheet1: TTabSheet;
procedure Panel1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
public
end;
var
Form1: TForm1;
implementation
procedure TForm1.Panel1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
PageControl1.BeginDrag (False, 10);
end;
end.
| EditForm.pas |
unit EditForm;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm2 = class(TForm)
Memo1: TMemo;
private
public
end;
var
Form2: TForm2;
implementation
end.
| CalForm.pas |
unit CalForm;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComCtrls;
type
TForm3 = class(TForm)
MonthCalendar1: TMonthCalendar;
private
public
end;
var
Form3: TForm3;
implementation
end.
| DockPF.dfm |
object Form1: TForm1
Left = 287
Top = 208
Width = 555
Height = 411
Caption = 'Docking Pages'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Splitter1: TSplitter
Left = 267
Top = 0
Width = 3
Height = 384
Cursor = crHSplit
HelpType = htKeyword
end
object Memo1: TMemo
Left = 270
Top = 0
Width = 277
Height = 384
Align = alClient
Lines.Strings = (
'Text...')
TabOrder = 0
end
object Panel1: TPanel
Left = 0
Top = 0
Width = 267
Height = 384
Align = alLeft
DockSite = True
TabOrder = 1
OnMouseDown = Panel1MouseDown
object PageControl1: TPageControl
Left = 1
Top = 1
Width = 265
Height = 382
ActivePage = TabSheet1
Align = alClient
DockSite = True
DragKind = dkDock
TabIndex = 0
TabOrder = 0
object TabSheet1: TTabSheet
Caption = 'List'
object ListBox1: TListBox
Left = 0
Top = 0
Width = 257
Height = 354
Align = alClient
ItemHeight = 13
Items.Strings = (
'one'
'two'
'three')
TabOrder = 0
end
end
end
end
end
| EditForm.dfm |
object Form2: TForm2
Left = 192
Top = 107
Width = 382
Height = 247
Caption = 'Small Editor'
Color = clBtnFace
DragKind = dkDock
DragMode = dmAutomatic
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Visible = True
PixelsPerInch = 96
TextHeight = 13
object Memo1: TMemo
Left = 0
Top = 0
Width = 374
Height = 220
Align = alClient
Lines.Strings = (
'Memo1')
TabOrder = 0
end
end
| CalForm.dfm |
object Form3: TForm3
Left = 280
Top = 139
Width = 195
Height = 333
Caption = 'Calendar'
Color = clBtnFace
DragKind = dkDock
DragMode = dmAutomatic
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Visible = True
PixelsPerInch = 96
TextHeight = 13
object MonthCalendar1: TMonthCalendar
Left = 0
Top = 0
Width = 187
Height = 306
Align = alClient
AutoSize = True
Date = 35986.3429524306
TabOrder = 0
end
end
|
|