Changeset 44 for DockManager/Lazarus/Demo/UMainForm.pas
- Timestamp:
- Sep 16, 2010, 2:15:02 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DockManager/Lazarus/Demo/UMainForm.pas
r43 r44 19 19 procedure FormCreate(Sender: TObject); 20 20 procedure FormShow(Sender: TObject); 21 procedure ListView1EndDrag(Sender, Target: TObject; X, Y: Integer);22 procedure ListView1StartDrag(Sender: TObject; var DragObject: TDragObject);23 procedure Panel1MouseDown(Sender: TObject; Button: TMouseButton;24 Shift: TShiftState; X, Y: Integer);25 21 private 26 22 { private declarations } … … 28 24 FormIndex: Integer; 29 25 LastDockForm: TDockForm; 26 function NewDockForm: TDockForm; 30 27 end; 31 28 … … 49 46 DockForm3: TDockForm; 50 47 begin 51 Button1Click(Self); 52 DockForm1 := LastDockForm; 48 DockForm1 := NewDockForm; 53 49 DockForm1.ManualDock(Panel1); 54 50 55 Button1Click(Self); 56 DockForm2 := LastDockForm; 51 DockForm2 := NewDockForm; 57 52 DockForm2.ManualDock(Panel1); 58 53 59 Button1Click(Self); 60 DockForm3 := LastDockForm; 54 DockForm3 := NewDockForm; 61 55 DockForm3.ManualDock(DockForm2); 62 56 end; 63 57 64 procedure TMainForm.ListView1EndDrag(Sender, Target: TObject; X, Y: Integer);58 function TMainForm.NewDockForm: TDockForm; 65 59 begin 66 67 end; 68 69 procedure TMainForm.ListView1StartDrag(Sender: TObject; 70 var DragObject: TDragObject); 71 begin 72 73 end; 74 75 procedure TMainForm.Panel1MouseDown(Sender: TObject; Button: TMouseButton; 76 Shift: TShiftState; X, Y: Integer); 77 begin 78 60 Result := TDockForm.Create(Self); 61 Result.Name := 'Form' + IntToStr(FormIndex); 62 Result.Memo1.Text := Result.Name; 63 Result.DragKind := dkDock; 64 Result.DragMode := dmAutomatic; 65 Result.DockSite := True; 66 Result.UseDockManager := True; 67 Inc(FormIndex); 68 Result.Show; 79 69 end; 80 70 81 71 procedure TMainForm.Button1Click(Sender: TObject); 82 var83 NewForm: TDockForm;84 72 begin 85 NewForm := TDockForm.Create(Self); 86 NewForm.Name := 'Form' + IntToStr(FormIndex); 87 NewForm.Memo1.Text := NewForm.Name; 88 NewForm.DragKind := dkDock; 89 NewForm.DragMode := dmAutomatic; 90 NewForm.DockSite := True; 91 NewForm.UseDockManager := True; 92 Inc(FormIndex); 93 NewForm.Show; 94 LastDockForm := NewForm; 73 NewDockForm; 95 74 end; 96 75
Note:
See TracChangeset
for help on using the changeset viewer.