mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:00:43 +02:00
cocoa: adding support for removal tabs by freeing handle. Patch by David Jenkins. #35171
git-svn-id: trunk@61008 -
This commit is contained in:
parent
c3c3dea2a2
commit
ff9256aff6
@ -63,6 +63,7 @@ type
|
||||
class function GetCocoaTabPageFromHandle(AHandle: HWND): TCocoaTabPage;
|
||||
published
|
||||
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
|
||||
class procedure DestroyHandle(const AWinControl: TWinControl); override;
|
||||
class procedure UpdateProperties(const ACustomPage: TCustomPage); override;
|
||||
class procedure SetProperties(const ACustomPage: TCustomPage; ACocoaControl: NSTabViewItem);
|
||||
//
|
||||
@ -582,6 +583,18 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
class procedure TCocoaWSCustomPage.DestroyHandle(const AWinControl: TWinControl);
|
||||
var
|
||||
tv: TCocoaTabPageView;
|
||||
ndx: Integer;
|
||||
begin
|
||||
tv := TCocoaTabPageView(AWinControl.Handle);
|
||||
ndx := tv.tabView.exttabIndexOfTabViewItem(tv.tabPage);
|
||||
if ndx >= 0 then
|
||||
tv.tabview.exttabRemoveTabViewItem(tv.tabPage);
|
||||
TCocoaWSWinControl.DestroyHandle(AWinControl);
|
||||
end;
|
||||
|
||||
class procedure TCocoaWSCustomPage.UpdateProperties(const ACustomPage: TCustomPage);
|
||||
var
|
||||
lTabPage: TCocoaTabPage;
|
||||
|
Loading…
Reference in New Issue
Block a user