Changeset 182 for Docking/CoolDocking/Demo/IDE/UMainForm.pas
- Timestamp:
- Mar 9, 2011, 2:11:40 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/Demo/IDE/UMainForm.pas
r181 r182 95 95 procedure FormShow(Sender: TObject); 96 96 public 97 procedure InitDefaultDockLayout; 97 98 end; 98 99 … … 137 138 if FileExistsUTF8(DockLayoutFileName) then 138 139 LoadFromFile(DockLayoutFileName); 140 InitDefaultDockLayout; 139 141 PopulateStringList(ComboBox1.Items); 142 end; 143 end; 144 145 procedure TMainForm.InitDefaultDockLayout; 146 const 147 DefaultLayoutName = 'Default Layout'; 148 var 149 NewContainer1: TCoolDockConjoinForm; 150 NewContainer2: TCoolDockConjoinForm; 151 DefaultLayout: TCoolDockLayout; 152 begin 153 DefaultLayout := CoolDockLayoutList1.FindByName(DefaultLayoutName); 154 if not Assigned(DefaultLayout) then begin 155 NewContainer1 := TCoolDockConjoinForm.Create(nil); 156 NewContainer1.Show; 157 158 StructureForm.ManualDock(NewContainer1.Panel, nil, alTop); 159 StructureForm.Show; 160 ObjectInspectorForm.ManualDock(NewContainer1.Panel, nil, alTop); 161 ObjectInspectorForm.Show; 162 163 NewContainer2 := TCoolDockConjoinForm.Create(nil); 164 NewContainer2.Show; 165 ProjectManagerForm.ManualDock(NewContainer2.Panel, nil, alTop); 166 ProjectManagerForm.Show; 167 ToolPaletteForm.ManualDock(NewContainer2.Panel, nil, alTop); 168 ToolPaletteForm.Show; 169 170 NewContainer1.ManualDock(Panel1); 171 SourceEditorForm.ManualDock(Panel1); 172 SourceEditorForm.Show; 173 NewContainer2.ManualDock(Panel1); 174 175 DefaultLayout := TCoolDockLayout.Create; 176 DefaultLayout.Name := DefaultLayoutName; 177 CoolDockLayoutList1.Items.Add(DefaultLayout); 178 DefaultLayout.Store; 140 179 end; 141 180 end;
Note:
See TracChangeset
for help on using the changeset viewer.