Re: XForms: What's up with this?

Steve Lamont (spl@szechuan.ucsd.edu)
Tue, 14 Jul 98 15:04:23 PDT

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

> In other words what I saw was expected behaviour. That just leaves one
> question in my mind. If it's not giving away too much about the form
> library code, how does the browser get away with resizing itself and not
> causing the form to be redrawn? In other words taking out the
> fl_set_object_size line in my example code doesn't cause the yellow
> triangle to disappear, so the browser must be doing something other than
> a fl_set_object_size when it needs to resize itself.

First of all, I don't think any of the internals of XForms are
particularly secret or proprietary -- it's just that TC and Mark want
to keep tight control of the source -- that's why source isn't
released.

I may have slightly misinformed you or misspoke if I led you to
believe that it's the fl_freeze_form() and fl_unfreeze_form() that's
causing your triangle to disappear. It's the fact that if you have
the fl_set_object_size() function call, this requires a full redraw of
all objects in the form -- thus causing the Window to be cleared. So
anything drawn with the fl_drw*() functions will be erased.

> The reason why I'm asking is that I was going to take your advice about
> using the browser instead of the fselector object(see my message "Using
> fselector for other than files"). But I realized it couldn't do
> something I wanted it to, or at least I don't think it can, please
> correct me if I'm wrong. 1) I wanted to be able to use symbols in the
> browser, I tried doing a fl_add_browser_line with the text set to "@>"
> but the triangle didn't get output. 2) I wanted to use text of different
> colors in the browser, more specifically I wanted a symbol at the
> beginning of the line in one color and the text in a different color.

This is something that I've been toying with as well -- at least
conceptually. No, the browser can't do what you want so you'll have
to cruft up something on your own.

You'll have to create your own object.

In this case, using the fl_drw*() functions *will* work if you use
them properly. They should be called from your FL_DRAW event
handler. That way they'll be called every time the browser needs
updating.

Refer to the manual section on creating your own objects (and, also,
the section on Free objects, since "roll your own" objects and Free
objects are quite similar in design and nature.

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