mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 00:19:22 +02:00
GTK2: TPageControl do not hide pages in ShowHide
git-svn-id: trunk@42625 -
This commit is contained in:
parent
920a610a6c
commit
9178ca6047
@ -362,8 +362,9 @@ begin
|
|||||||
// set LCL size
|
// set LCL size
|
||||||
AChild.SetBounds(AChild.Left, AChild.Top, ATabControl.ClientWidth, ATabControl.ClientHeight);
|
AChild.SetBounds(AChild.Left, AChild.Top, ATabControl.ClientWidth, ATabControl.ClientHeight);
|
||||||
|
|
||||||
if AChild.TabVisible then
|
// For a PageControl the widget must be visible
|
||||||
gtk_widget_show(PageWidget);
|
// If not the page control will not use it. It may not even show the tab
|
||||||
|
gtk_widget_show(PageWidget);
|
||||||
|
|
||||||
// Check if already created. if so just show it because it is invisible
|
// Check if already created. if so just show it because it is invisible
|
||||||
if gtk_notebook_get_tab_label(PGtkNoteBook(NoteBookWidget), PageWidget) <> nil
|
if gtk_notebook_get_tab_label(PGtkNoteBook(NoteBookWidget), PageWidget) <> nil
|
||||||
@ -655,15 +656,14 @@ var
|
|||||||
begin
|
begin
|
||||||
if not WSCheckHandleAllocated(AWinControl, 'ShowHide') then
|
if not WSCheckHandleAllocated(AWinControl, 'ShowHide') then
|
||||||
exit;
|
exit;
|
||||||
if (csDesigning in AWinControl.ComponentState) then
|
|
||||||
begin
|
// In a PageControl, the child widget must always be visible
|
||||||
AShow := Assigned(AWinControl.Parent) and (AWinControl.Parent is TCustomTabControl) and
|
// it will be controlled by gtk_notebook_set_page
|
||||||
TCustomTabControl(AWinControl.Parent).ShowTabs;
|
// Making a page invisible, also hides the tab.
|
||||||
TGtk2WidgetSet(WidgetSet).SetVisible(AWinControl,
|
if not (AWinControl is TTabControl) then
|
||||||
AShow);
|
exit;
|
||||||
end else
|
|
||||||
TGtk2WidgetSet(WidgetSet).SetVisible(AWinControl,
|
TGtk2WidgetSet(WidgetSet).SetVisible(AWinControl, AWinControl.HandleObjectShouldBeVisible);
|
||||||
TCustomPage(AWinControl).TabVisible);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TGtk2WSCustomPage.GetDefaultClientRect(
|
class function TGtk2WSCustomPage.GetDefaultClientRect(
|
||||||
|
Loading…
Reference in New Issue
Block a user