Re: XForms: Both problems (colors and scroll_bar)

Steve Lamont (spl@szechuan.ucsd.edu)
Thu, 22 Jan 98 18:03:38 PST

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

> Well, I put it bellow, but don't know if it is a Linux only bug or even
> something related to my VGA card, other programs don't seem to have such a
> behavior, but it seems to run well on a sparc with solaris

I didn't see the problem but I tested on a Sun SPARC 5 running X11R6.1
and SunOS, so I don't have a whole lot of information to impart here.

> > How are you using fl_line(), etc? Are you drawing with a Free object,
> > a Canvas object, or have you created your own object class?
>
> I'm using fl_line directly in the window that's why they get cleared,
> there are quite a lot of lines, that's why I didn't want to add them to
> the form, thouth it would be slow, should I change them so that I add them
> to the form instead of painting them directly?

I suspect that there's some interaction with the scrollbar handler,
the fl_hide_form() and fl_show_form() invocations, and your draw()
routine, getting XForms confused in its internal bookkeeping, perhaps
because the fl_line() and other similar functions aren't really
intended to be used outside of an object's FL_DRAW handler. I found
that if I called fl_winset() with the object's current Window as an
argument, as shown here,

fl_winset( FL_ObjWin( ob ) );
draw();
fl_set_scrollbar_bounds( ...

the problem went away, except, for some reason, the first time the
`sleep' button was pressed. If I eliminated the draw() routine, then
the phantom slider never appeared.

Perhaps you can explain what your application is ultimately trying to
do. That might give us some insight on a better way of attacking the
problem.

spl
_________________________________________________
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://bloch.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/