Ignore:
Timestamp:
Mar 10, 2011, 9:57:21 AM (14 years ago)
Author:
george
Message:
  • Fixed: Placing new form inside regions with different orientation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/Demo/IDE/UMainForm.pas

    r182 r184  
    1111  UMessagesForm, UCallStackForm, ULocalVariablesForm, UToDoListForm,
    1212  UWatchListForm, UThreadStatusForm, USourceEditorForm, UCoolDockWindowList,
    13   UCoolDockCustomize;
     13  UCoolDockCustomize, UComponentTree;
    1414
    1515const
     
    2222  TMainForm = class(TForm)
    2323  published
     24    AViewComponentTree: TAction;
    2425    AExit: TAction;
    2526    ANewFile: TAction;
     
    5758    MenuItem20: TMenuItem;
    5859    MenuItem21: TMenuItem;
     60    MenuItem22: TMenuItem;
    5961    MenuItem23: TMenuItem;
    6062    MenuItem24: TMenuItem;
     
    7375    MenuItem1: TMenuItem;
    7476    MainMenu1: TMainMenu;
    75     Panel1: TPanel;
     77    DockPanel: TPanel;
    7678    ToolBar1: TToolBar;
    7779    ToolButton1: TToolButton;
     
    8082    procedure AExitExecute(Sender: TObject);
    8183    procedure ANewFileExecute(Sender: TObject);
     84    procedure AViewComponentTreeExecute(Sender: TObject);
    8285    procedure AViewThreadStatusExecute(Sender: TObject);
    8386    procedure AViewCallStackExecute(Sender: TObject);
     
    153156  DefaultLayout := CoolDockLayoutList1.FindByName(DefaultLayoutName);
    154157  if not Assigned(DefaultLayout) then begin
    155     NewContainer1 := TCoolDockConjoinForm.Create(nil);
     158    NewContainer1 := TCoolDockManager(DockPanel.DockManager).CreateContainer(alRight);
    156159    NewContainer1.Show;
    157160
     
    161164    ObjectInspectorForm.Show;
    162165
    163     NewContainer2 := TCoolDockConjoinForm.Create(nil);
     166    NewContainer2 := TCoolDockManager(DockPanel.DockManager).CreateContainer(alRight);
    164167    NewContainer2.Show;
    165168    ProjectManagerForm.ManualDock(NewContainer2.Panel, nil, alTop);
     
    168171    ToolPaletteForm.Show;
    169172
    170     NewContainer1.ManualDock(Panel1);
    171     SourceEditorForm.ManualDock(Panel1);
     173    NewContainer1.ManualDock(DockPanel);
     174    SourceEditorForm.ManualDock(DockPanel);
    172175    SourceEditorForm.Show;
    173     NewContainer2.ManualDock(Panel1);
     176    NewContainer2.ManualDock(DockPanel);
    174177
    175178    DefaultLayout := TCoolDockLayout.Create;
     
    220223    CoolDockLayoutList1.Items.Add(NewLayout);
    221224  end else
    222     TCoolDockLayout(CoolDockLayoutList1.Items[ComboBox1.ItemIndex]).Store;
     225    TCoolDockLayout(CoolDockLayoutList1.Items[ComboBox1.Items.IndexOf(ComboBox1.Text)]).Store;
     226  CoolDockLayoutList1.SaveToFile(DockLayoutFileName);
    223227  CoolDockLayoutList1.PopulateStringList(ComboBox1.Items);
    224228end;
     
    232236begin
    233237  SourceEditorForm.Show;
     238end;
     239
     240procedure TMainForm.AViewComponentTreeExecute(Sender: TObject);
     241begin
     242  ComponentTree.Show;
    234243end;
    235244
Note: See TracChangeset for help on using the changeset viewer.