Ignore:
Timestamp:
Dec 8, 2010, 10:40:38 AM (14 years ago)
Author:
george
Message:
  • Added: Windows showing application component tree with names and types.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/UCoolDocking.pas

    r89 r96  
    3232    Panel: TPanel;
    3333    CoolDockClient: TCoolDockClient;
     34    procedure FormShow(Sender : TObject);
    3435    constructor Create(TheOwner: TComponent); override;
    3536  end;
     
    365366
    366367  PopupMenuTabs := TPopupMenu.Create(FDockSite);
     368  PopupMenuTabs.Name := ADockSite.Name + '_' + 'PopupMenuTabs';
    367369
    368370  NewMenuItem := TMenuItem.Create(PopupMenuTabs);
     
    432434
    433435  PopupMenuHeader := TPopupMenu.Create(FDockSite);
     436  PopupMenuHeader.Name := ADockSite.Name + '_' + 'PopupMenuHeader';
    434437
    435438  NewMenuItem := TMenuItem.Create(PopupMenuHeader);
     
    498501  TabImageList := TImageList.Create(FDockSite);
    499502  with TabImageList do begin
     503    Name := ADockSite.Name + '_' + 'ImageList';
    500504  end;
    501505  TabControl := TTabControl.Create(FDockSite);
    502506  with TabControl do begin
    503507    Parent := FDockSite;
     508    Name := ADockSite.Name + '_' + 'TabControl';
    504509    Visible := False;
    505510    Align := alTop;
     
    863868    TCoolDockClientPanel(FDockPanels[I]).Control.Align := alClient;
    864869    TCoolDockClientPanel(FDockPanels[I]).Control.Visible := False;
     870
     871    // Workaround for "Cannot focus" error
     872    TForm(TCoolDockClientPanel(FDockPanels[I]).Control).ActiveControl := nil;
    865873  end;
    866874  if (TabControl.TabIndex <> -1) and (FDockPanels.Count > TabControl.TabIndex) then begin
     
    882890      end;
    883891    end;
    884 //  TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Visible := True;
     892  //TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Visible := True;
    885893  end;
    886894  MouseDownSkip := True;
     
    11081116{ TCoolDockConjoinForm }
    11091117
     1118procedure TCoolDockConjoinForm.FormShow(Sender: TObject);
     1119begin
     1120  //Panel.Show;
     1121end;
     1122
    11101123constructor TCoolDockConjoinForm.Create(TheOwner: TComponent);
    11111124begin
     
    11141127  with Panel do begin
    11151128    Parent := Self;
     1129    Name := Parent.Name + '_Panel';
    11161130    DockSite := True;
    11171131    UseDockManager := True;
     
    11241138  with CoolDockClient do begin
    11251139    Panel := Self.Panel;
    1126   end;
     1140    Name := Owner.Name + '_CoolDockClient';
     1141  end;
     1142  OnShow := FormShow;
    11271143end;
    11281144
Note: See TracChangeset for help on using the changeset viewer.