Re: XForms: Repositioning Problem with Popups

Robert James (james@saic.alaska.net)
Mon, 21 Dec 1998 08:17:41 -0900 (AKST)

# To subscribers of the xforms list from Robert James <james@saic.alaska.net> :

> From owner-xforms@bob.usuf2.usuhs.mil Fri Dec 18 17:30 AKS 1998
> Date: Fri, 18 Dec 98 17:40:50 PST
> From: spl@szechuan.ucsd.edu (Steve Lamont)
> To: xforms@bob.usuf2.usuhs.mil
> Subject: Re: XForms: Repositioning Problem with Popups
>
> # To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont)
:
>
> > Problem: suppose I enter an input object with the mouse, causing the
> > popup to appear, then instead of selecting an option on the popup
> > menu, I reposition the whole form, by dragging with the mouse. The
> > popups don't move with the form!! They simply remain where they
> > were first created with respect to the screen. I got most of my
> > ideas for writing the application from your pup.c DEMO which is
> > limited in its scope.
>
> It's not clear to me how this would occur since you'd have to move the
> cursor out of the form and click on a drag/title bar to do this.
>
I've investigated it further. You're right. I'm not really able to drag as long
as the popups exists. The problem occurs on a popup AFTER I drag the form. The
popup appears at the location of the form BEFORE it was dragged.

> Wouldn't you want the popup to disappear when you lost focus from the
> input object, that is when the cursor left the input object? Or do
> you have some other mechanism for moving the form while the focus
> remains in the input object? Frankly, I can't think of one that would
> once could concievably use.
>
I was intent on having the popup disappear by itself after the cursor left the
input object, but that never seems to happen by itself, and since I know of no
command that will cause it to disappear programmatically, it remains until the
operator makes a choice by clicking on it. If there were such a command I could
make it disappear by change of focus and several other conditions. By the way
I'm using the fl_set_object_posthandler command to get the popups to work--a bit
like in your pup.c.

> If the problem is that after moving the form the popups appear on the
> old location, then you should use one of the fl_get*_mouse() functions
> to get the current location of the cursor, calculate the popup
> position, and deploy it in the standard manner.
>
>
Yes, fl_get_mouse is something I hadn't thought of. I spent most of Friday
looking for a command that would give me the new position of the form after it
was dragged. This would enable me to recalculate the position where the popup
should be and position it there. But I couldn't find such a command. I'll try
your suggestion with the mouse. Thanks.
> _________________________________________________
>
Bob James
_________________________________________________
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/