Changeset 373 for Docking/CoolDocking/Managers/UCDManagerTabs.pas
- Timestamp:
- Jun 7, 2012, 9:45:29 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/Managers/UCDManagerTabs.pas
r365 r373 40 40 function GetHeaderPos: THeaderPos; override; 41 41 function FindTabSheet(TabSheet: TTabSheet): TCDManagerTabsItem; 42 procedure PageControlContextPopup(Sender: TObject; MousePos: TPoint; 43 var Handled: Boolean); 42 44 public 43 45 MouseDownSkip: Boolean; … … 189 191 MultiLine := True; 190 192 AutoSize := True; 191 PopupMenu := Self.PopupMenu;193 OnContextPopup := PageControlContextPopup; 192 194 OnMouseLeave := TabControlMouseLeave; 193 195 OnMouseDown := TabControlMouseDown; … … 307 309 end; 308 310 311 procedure TCDManagerTabs.PageControlContextPopup(Sender: TObject; 312 MousePos: TPoint; var Handled: Boolean); 313 var 314 I: Integer; 315 R: TRect; 316 begin 317 with Sender as TPageControl do begin 318 PopupMenu := nil; 319 for I := 0 to PageControl.PageCount - 1 do begin 320 R := PageControl.TabRect(I); 321 if (MousePos.X >= R.Left) and (MousePos.Y >= R.Top) and 322 (MousePos.X <= R.Right) and (MousePos.Y <= R.Bottom) then begin 323 PopupMenu := Self.PopupMenu; 324 Break; 325 end; 326 end; 327 end; 328 end; 329 309 330 procedure TCDManagerTabs.BringToFront; 310 331 begin
Note:
See TracChangeset
for help on using the changeset viewer.