XForms: CHANGING browser's DEFAULTS

Igor_Furlan (ifur@zilog.com)
Sun, 26 Apr 98 16:05:55 PDT

# To subscribers of the xforms list from Igor_Furlan <ifur@zilog.com> :

spl@szechuan.ucsd.edu (Steve Lamont) WROTE:

fl_get_object_component(). For instance, as shown in the manual,

hscrollbar = fl_get_object_component( your_browser,FL_SCROLLBAR,
FL_HOR_THIN_SCROLLBAR,0 );

You can then modify the attributes of the scrollbar as you wish.

IGOR:
Yes, It work fine. Thanks !!!

STEVE LAMONT:
I don't think there is any provision for changing the type of the
scrollbar, say from FL_HOR_THIN_SCROLLBAR to FL_HOR_NICE_SCROLLBAR,
since this would mean actually creating a new object. As a quick
experiment, I tried to alter the `type' field and it didn't produce a
desirable result.

IGOR :

I did try the following :

CASE A)----------------------------------------------------------

int main(int argc, char *argv[])
{

FL_OBJECT *obj;

FL_IOPT fl_cntl;
fl_cntl.scrollbarType = FL_NICE_SCROLLBAR;
fl_set_defaults(FL_PDScrollbarType, &fl_cntl);

fl_initialize(&argc, argv, "MY_DEMO", 0, 0);
create_form();

..............
..............

It did not work. At run time I did get the following :

In GetComponent [child.c 225] requested object not found
In fl_set_object_boxtype [util.c 43] Setting boxtype of NULL object.
In fl_bgn_form [forms.c 56] You forgot to call fl_end_form

CASE B)-------------------------------------------------------
int main(int argc, char *argv[])
{

FL_OBJECT *obj;

fl_set_scrollbar_type(FL_NICE_SCROLLBAR);

fl_initialize(&argc, argv, "MY_DEMO", 0, 0);
create_form();

..............
..............

At run time the result was the same:

In GetComponent [child.c 225] requested object not found
In fl_set_object_boxtype [util.c 43] Setting boxtype of NULL object.
In fl_bgn_form [forms.c 56] You forgot to call fl_end_form

===================================================================

I did try the above mentioned case based on suggestions from
Xforms documentation (v0.88) which spells:

------BEGIN--------------------------- from the manual -------------
To change the default scrollbars (which are THIN_SCROLLBARs)
used in browser and input object, the following convenience
function can be used:

void fl_set_scrollbar_type(int type)

where type can be one of the following

FL_NORMAL_SCROLLBAR The basic scrollbar.
FL_THIN_SCROLLBAR The thin scrollbar
FL_NICE_SCROLLBAR The nice scrollbar
FL_PLAIN_SCROLLBAR Similar to thin scrollbar, but not as fancy.

which is equivalent to

FL_IOPT fl_cntl;
fl_cntl.scrollbarType = type;
fl_set_defaults(FL_PDScrollbarType, &fl_cntl);

It is recommended that this function be used before fl_initialize()
so the user has the option to override the default through
application resources.
-----------END-------------- from the manual ---------------------

Does somebody have an idea what did I do wrong ???

Thanks in advance

Igor

~

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