diff options
| author | Greg Ercolano <erco@seriss.com> | 2013-08-05 18:05:44 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2013-08-05 18:05:44 +0000 |
| commit | a00dd72b8f593fc7f57b3d4a2b821957b1006718 (patch) | |
| tree | 033abb9e1ed3f15438e28cb8ee97fa461205483b | |
| parent | c450606e4e62c3aa7e49e208cb9b64c6a46d2a41 (diff) | |
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
| -rw-r--r-- | FL/Fl_Tabs.H | 21 |
1 files changed, 20 insertions, 1 deletions
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); { |
