Marco Web Center |
Home: Code Repository: Mastering Delphi 5Project DOCKPAGE
Project StructureDOCKPAGE.DPRprogram DockPage; uses Forms, DockPF in 'DockPF.pas' {Form1}, EditForm in 'EditForm.pas' {Form2}, CalForm in 'CalForm.pas' {Form3}; {$R *.RES} begin Application.Initialize; Application.CreateForm(TForm1, Form1); Application.CreateForm(TForm2, Form2); Application.CreateForm(TForm3, Form3); Application.Run; end. DOCKPF.PASunit 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 { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} procedure TForm1.Panel1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin PageControl1.BeginDrag (False, 10); end; end. EDITFORM.PASunit EditForm; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm2 = class(TForm) Memo1: TMemo; private { Private declarations } public { Public declarations } end; var Form2: TForm2; implementation {$R *.DFM} end. CALFORM.PASunit CalForm; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls; type TForm3 = class(TForm) MonthCalendar1: TMonthCalendar; private { Private declarations } public { Public declarations } end; var Form3: TForm3; implementation {$R *.DFM} end. DOCKPF.DFMobject 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 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 AutoSize = True 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 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.DFMobject 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.DFMobject 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
|
||
© Copyright Marco Cantù, 1995-2020, All rights reserved |