mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-28 13:17:16 +01:00
fixed RemovePage. And I forgot last cvs log entry: TPage.TabVisible from Andrew Haines
git-svn-id: trunk@6528 -
This commit is contained in:
parent
f8d3853f8c
commit
5916c57809
@ -293,12 +293,15 @@ procedure TGtkWSCustomNotebook.RemovePage(const ANotebook: TCustomNotebook;
|
|||||||
const AIndex: integer);
|
const AIndex: integer);
|
||||||
var
|
var
|
||||||
PageWidget: PGtkWidget;
|
PageWidget: PGtkWidget;
|
||||||
|
Page: TCustomPage;
|
||||||
begin
|
begin
|
||||||
// The gtk does not provide a function to remove a page without destroying it.
|
// The gtk does not provide a function to remove a page without destroying it.
|
||||||
// Luckily the LCL destroys the Handle, when a page is removed, so this
|
// Luckily the LCL destroys the Handle, when a page is removed, so this
|
||||||
// function is not needed.
|
// function is not needed.
|
||||||
// However this is usefull for the TCustomPage.TabVisible property. :)
|
// However this is usefull for the TCustomPage.TabVisible property. :)
|
||||||
PageWidget := PGtkWidget(ANotebook.Page[AIndex].Handle);
|
Page:=ANotebook.Page[AIndex];
|
||||||
|
if not Page.HandleAllocated then exit;
|
||||||
|
PageWidget := PGtkWidget(Page.Handle);
|
||||||
gtk_widget_hide(PageWidget);
|
gtk_widget_hide(PageWidget);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user