Re: XForms: Combine two forms' position ?

Steve Lamont (
Fri, 6 Jun 97 11:47:09 PDT

To subscribers of the xforms list from (Steve Lamont) :

> My program displays two forms at the same time. The larger one seems to
> include the smaller one. So, I wanna combine these two forms like that
> when I change one of their position in the monitor, they should move
> simultaneously. So always to look the larger form include the smaller
> one. How can I do that?

The first question is why not just combine the forms? That would seem
to be the simplest way of handling the problem.

Otherwise, you probably need to delve into receiving ConfigureNotify
events which will be generated whenever a Window changes size,
position, or stacking order. I'm not exactly sure when the
ConfigureNotify is generated or even *if* it is on a position change,
since the XForms Window is generally actually enclosed in a Window
created by your window manager that contains all of the decoration
(title bars, border, go away box, etc.).

This will probably vary between window managers and it will probably
depend upon whether your window manager supports such things as
MoveOpaque or not.

You may have to resort to an idle procedure to monitor the position of
your main window, which will burn a lot of CPU cycles unnecessarily.

I think given the complication, I'd consider combining the two forms
into one rather than trying to deal with the headaches arising from
such a kluge.

If the second form is only a transient, consider wrapping it in a
Group Object and then hiding or showing it as needed.


To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: