[Fwd: Re: XForms: Some xforms implementation questions.]

From: Reed Riddle (drriddle@qwest.net)
Date: Thu Aug 29 2002 - 11:58:26 EDT

  • Next message: Jeff: "Re: XForms: Some xforms implementation questions."

    Hmmm, this didn't seem to go through, I'll try it again through this
    account...

                                            Reed


    attached mail follows:


    On Thu, 2002-08-29 at 08:31, spl@ncmir.ucsd.edu wrote:
    > # To subscribers of the xforms list from spl@ncmir.ucsd.edu :
    >
    > > How do you make the actual window the focus? I have one input box and
    > > only want it have focus when it is clicked on and give up the focus back
    > > to the window after the data is input. Plus, clicking on the window
    > > background gives it the focus.
    >
    > Focus policy is largely a function of your window manager. I'm not
    > sure what you want to do is possible without making the window go
    > away.
    >
    > I suppose you could play some trick by warping the pointer (cursor)
    > but moving the user's pointer is generally considered anti-social.
    >
    > I can't think of an X application that does what you suggest.
    >
    > Anyone else?

    You can freeze all the other forms, then pop up an input window
    underneath the cursor. I do the following for error messages:

      fl_deactivate_all_forms();
      errorwin = create_form_errorwin();
      fl_set_object_label(errorwin->text_error, message);
      fl_show_form(errorwin->errorwin,FL_PLACE_HOTSPOT,FL_TRANSIENT,"");

      do {
        obj = fl_do_only_forms();
      } while (obj != errorwin->but_error);
      
      fl_hide_form(errorwin->errorwin);
      fl_free_form(errorwin->errorwin);
      fl_activate_all_forms();

    The do loop holds this window in place until the exit button is hit, and
    no other windows are active. I don't know how this would work with an
    input field, but, presumably, that value can be passed to a callback. I
    would bet that there is a similar way to do this where you freeze all
    the other objects in the form (after freezing all of the other forms),
    which would leave only the input object active...you would probably need
    some kind of button to return the rest of the application to activity.
    Beyond that, it's a matter of playing with it. :) Good luck!

                                            Reed

    -- 
    Dr. Reed L. Riddle
    Associate Director of Whole Earth Telescope Operations
    Iowa State University, Department of Physics & Astronomy
    Email:  riddle@iastate.edu			
    Homepage:  http://www.iitap.iastate.edu/~riddle/
    

    "This life has been a test. If it had been an actual life, you would have received actual instructions on where to go and what to do." -- Angela Chase, "My so-called life"

    _________________________________________________ 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://world.std.com/~xforms List Archive: http://bob.usuhs.mil/mailserv/list-archives/



    This archive was generated by hypermail 2b29 : Thu Aug 29 2002 - 12:01:42 EDT