Next: Scrollbar Remarks, Previous: Other Scrollbar Routines, Up: Scrollbar Object [Contents][Index]
Never use FL_NO_BOX
as the boxtype for a scrollbar. For
FL_VERT_NICE_SCROLLBAR
s and FL_HOR_NICE_SCROLLBAR
s it’s
best to use a FL_FLAT_BOX
boxtype in the color of the
background to get the nicest effect.
The first color argument (col1
to
fl_set_object_color()
controls the color of the
background of the scrollbar, the second (col2
) the color of the
sliding bar itself.
You can control the size of the sliding bar inside the box using the routine
void fl_set_scrollbar_size(FL_OBJECT *obj, double size);
size
should be a value between 0.0 and 1.0. The default is
FL_SLIDER_WIDTH
, which is 0.15 for all scrollbars With
size
set to 1.0, the scrollbar covers the box completely and
can no longer be moved. This function does nothing if applied to
scrollbars of type FL_NICE_SCROLLBAR
.
double fl_get_scrollbar_size(FL_OBJECT *obj);
returns the current setting of the scrollbar size.