Re: XForms: Using Object Components

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 26 May 99 15:15:56 PDT

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> Appendix section A.4 "Setting Attributes" gives a good hint at how to go
> about getting a handle on scrollbars with which it should be possible to
> change the color of browser scrollbars? Is this correct?
>
> If it is possible to do such a thing then I have tried using the example
> from the manual:
>
> hscrollbar = fl_get_object_component(browser, FL_SCROLLBAR,
> FL_HOR_THIN_SCROLLBAR, 0);
>
> and I have had no success whatever. For "browser" I am using the FL_OBJECT
> from the browser whose scrollbars I want to change colors. If a more
> detailed example were available, showing how to change scrollbar colors, it
> might save a lot of explanatory words and time.

Here's an example:

FD_try *fd_try;
FL_OBJECT *vscrollbar;

[...]

fd_try = create_form_try();

[...]

vscrollbar =
fl_get_object_component( fd_try->browser,
FL_SCROLLBAR,
FL_VERT_THIN_SCROLLBAR,
0 );
fl_set_object_color( vscrollbar, FL_BLUE, FL_RED );

This sets the background of the scroll bar to blue and the arrows and
the slider to red.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/