lcl: gtk2: fixed ShowHide for TCustomTabControl

git-svn-id: trunk@45395 -
This commit is contained in:
mattias 2014-06-08 10:18:38 +00:00
parent 1fea8f2641
commit b5c02e352d

View File

@ -369,7 +369,7 @@ begin
end; end;
// For a PageControl the widget must be visible // For a PageNotebook the widget must be visible
// If not the page control will not use it. It may not even show the tab // If not the page control will not use it. It may not even show the tab
gtk_widget_show(PageWidget); gtk_widget_show(PageWidget);
@ -711,10 +711,10 @@ begin
if not WSCheckHandleAllocated(AWinControl, 'ShowHide') then if not WSCheckHandleAllocated(AWinControl, 'ShowHide') then
exit; exit;
// In a PageControl, the child widget must always be visible // In a PageNoteBook, the child widget must always be visible
// it will be controlled by gtk_notebook_set_page // it will be controlled by gtk_notebook_set_page
// Making a page invisible, also hides the tab. // Making a page invisible, also hides the tab.
if (AWinControl.Parent = nil) or (AWinControl.Parent is TPageControl) then if (AWinControl.Parent = nil) or (AWinControl.Parent is TCustomTabControl) then
exit; exit;
TGtk2WidgetSet(WidgetSet).SetVisible(AWinControl, AWinControl.HandleObjectShouldBeVisible); TGtk2WidgetSet(WidgetSet).SetVisible(AWinControl, AWinControl.HandleObjectShouldBeVisible);