Changeset 354 for Docking/CoolDocking/Managers/UCDManagerTabs.pas
- Timestamp:
- Apr 26, 2012, 9:12:02 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/Managers/UCDManagerTabs.pas
r253 r354 44 44 TabImageList: TImageList; 45 45 PageControl: TPageControl; 46 procedure Update ClientSize; override;46 procedure Update; override; 47 47 procedure SetHeaderPos(const AValue: THeaderPos); override; 48 48 procedure InsertControlNoUpdate(Control: TControl; InsertAt: TAlign); virtual; … … 82 82 Temp2: TControl; 83 83 begin 84 DebugLog('TCDManagerTabsItem.VisibleChange'); 84 85 with TCDManagerTabs(Manager) do begin 85 86 if TControl(Sender).Visible then begin 86 Update ClientSize;87 Update; 87 88 Switch(DockItems.IndexOf(FindControlInPanels(TControl(Sender)))); 88 89 TCDManagerTabsItem(DockItems[DockItems.IndexOf( 89 90 FindControlInPanels(TControl(Sender)))]).HideType := dhtPermanent; 90 end else Update ClientSize;91 end else Update; 91 92 end; 92 93 … … 143 144 procedure TCDManagerTabs.TabControlChange(Sender: TObject); 144 145 begin 145 UpdateClientSize; 146 DebugLog('TCDManagerTabs.TabControlChange ' + IntToStr(PageControl.TabIndex)); 147 Update; 146 148 MouseDownSkip := True; 147 149 end; … … 189 191 OnChange := TabControlChange; 190 192 MultiLine := True; 193 AutoSize := True; 191 194 PopupMenu := Self.PopupMenu; 192 195 OnMouseLeave := TabControlMouseLeave; … … 225 228 procedure TCDManagerTabs.Switch(Index: Integer); 226 229 begin 230 DebugLog('TCDManagerTabs.Switch ' + IntToStr(Index)); 227 231 PageControl.TabIndex := Index; 228 232 end; … … 265 269 end; //else raise Exception.Create(Format('Control %s not found in DockItems', [Control.Name])); 266 270 267 ManagerItem.Control.Visible := False;271 //ManagerItem.Control.Visible := False; 268 272 ManagerItem.Control.Parent := nil; 269 273 DockItems.Remove(ManagerItem); … … 279 283 end else TCDManagerItem(DockItems[0]).Control.ManualFloat(Rect(Left, Top, Left + Width, Top + Height)); 280 284 ManualFloat(Rect(Left, Top, Left + Width, Top + Height)); 281 //Update ClientSize;285 //Update; 282 286 inherited RemoveControl(Control); 283 287 Free; … … 286 290 end; 287 291 //if ClientCount > 0 then 288 Update ClientSize;292 Update; 289 293 inherited RemoveControl(Control); 290 294 end; … … 341 345 inherited; 342 346 InsertControlNoUpdate(AControl, InsertAt); 343 Update ClientSize;344 end; 345 346 procedure TCDManagerTabs.Update ClientSize;347 Update; 348 end; 349 350 procedure TCDManagerTabs.Update; 347 351 var 348 352 I: Integer; … … 350 354 DeletedPage: TTabSheet; 351 355 begin 356 if FUpdateCount = 0 then begin 357 DebugLog('TCDManagerTabs.Update'); 352 358 for I := 0 to DockItems.Count - 1 do 353 359 with TCDManagerTabsItem(DockItems[I]) do begin … … 407 413 //TCDClientPanel(FDockPanels[I]).DockPanelPaint(Self); 408 414 end; 409 inherited UpdateClientSize; 415 end; 416 inherited; 410 417 end; 411 418
Note:
See TracChangeset
for help on using the changeset viewer.