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
This commit is contained in:
parent
c450606e4e
commit
a00dd72b8f
21
FL/Fl_Tabs.H
21
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);
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user