From a00dd72b8f593fc7f57b3d4a2b821957b1006718 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Mon, 5 Aug 2013 18:05:44 +0000 Subject: Elaborate on Fl_Tab's transparent region (behind and to the right of tabs), and some example code on how to keep tab heights constant. (Thanks to Ian MacArthur's post on fltk.general) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9954 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Tabs.H | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/FL/Fl_Tabs.H b/FL/Fl_Tabs.H index a07fdd789..270d4ca49 100644 --- a/FL/Fl_Tabs.H +++ b/FL/Fl_Tabs.H @@ -50,7 +50,26 @@ fluid browser to select each child group and resize them until the tabs look the way you want them to. - Typical use: + The background area behind and to the right of the tabs is transparent, + inheriting the color of the parent. The setting of Fl_Tabs::box() + does not affect this. So, if Fl_Tabs is resized by itself, without + the parent, you may need to force the parent to redraw() after resizing + to prevent artifacts in this "transparent" region. + + Resizing note: when Fl_Tabs is resized vertically, the default + behavior scales the tab's height as well as its children. + To keep the tab height constant during resizing, set the + tab widget's resizable() to one of the tab's children, i.e. + + \code + tabs = new Fl_Tabs(..); + child_a = new Fl_Group(..); + child_b = new Fl_Group(..); + tabs->end(); + tabs->resizable(child_a); // keeps tab height constant + \endcode + + A typical use of the Fl_Tabs widget: \code Fl_Tabs *tabs = new Fl_Tabs(10,10,300,200); { -- cgit v1.2.3