Ignore:
Timestamp:
Mar 7, 2011, 4:16:02 PM (14 years ago)
Author:
george
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/UCoolDockPopupMenu.pas

    r176 r177  
    163163  Control: TControl;
    164164begin
    165   if PopupComponent is TTabControl then
    166   with TTabControl(PopupComponent) do begin
     165  if PopupComponent is TPageControl then
     166  with TPageControl(PopupComponent) do begin
    167167    TForm(TCoolDockClientPanel(TCoolDockManager(Manager).DockPanels[TabIndex]).Control).Close;
    168168  end;
     
    178178begin
    179179  //ShowMessage(PopupComponent.ClassName);
    180   if PopupComponent is TTabControl then
    181   with TTabControl(PopupComponent) do begin
     180  if PopupComponent is TPageControl then
     181  with TPageControl(PopupComponent) do begin
    182182    Value := TCoolDockClientPanel(TCoolDockManager(Manager).DockPanels[TabIndex]).Control.Caption;
    183183    if InputQuery(SRenameWindow, SEnterNewWindowName, False, Value) then begin
    184184      TCoolDockClientPanel(TCoolDockManager(Manager).DockPanels[TabIndex]).Control.Caption := Value;
    185       Tabs[TabIndex] := Value;
     185      Pages[TabIndex].Caption := Value;
    186186    end;
    187187  end;
     
    228228  Control: TControl;
    229229begin
    230 
    231   //Control.ManualFloat(Control.BoundsRect);
     230  if PopupComponent is TPageControl then
     231  with TPageControl(PopupComponent) do begin
     232    Control := TCoolDockClientPanel(TCoolDockManager(Manager).DockPanels[TabIndex]).Control;
     233  end else
     234  if PopupComponent is TCoolDockHeader then
     235  with TCoolDockHeader(PopupComponent) do begin
     236    Control := ParentClientPanel.Control;
     237  end else Control := nil;
     238  if Assigned(Control) then
     239    Control.ManualFloat(Control.BoundsRect);
    232240end;
    233241
Note: See TracChangeset for help on using the changeset viewer.