RE: XForms: "Modal" forms

Steve Lamont (spl@szechuan.ucsd.edu)
Tue, 16 Jun 98 06:34:33 PDT

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

> > I would like to know how to create a "modal" form. Let me explain, I would
> > like a form that blocks my program until it closes and returns a result.
> > (exactly like the file selector ....)
>
> Although I'm sure there are other ways, you can use fl_deactivate_form for
> blocking and fl_set_cursor(form->window,XC_watch) to give the user some
> feedback. I use this method when all forms al controlled by callbacks.

That's more or less the method. You can also issue

fl_deactivate_all_forms();

prior to realizing your "modal" form with fl_show_form(). This will
disable interaction with all forms but your dialog box and you'll be
spared the bookkeeping of tracking which forms you have open at any
particular instant.

Of course, you should remember to re-activate all your forms when your
dialog box goes away. Use fl_activate_all_forms() to do this.

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/