XmForm question - Motif

This is a discussion on XmForm question - Motif ; Suppose a form has two child widgets, W1 and W2 with the following attachments W1: top, left, bottom : form W2: left : W1 right, top, bottom : form so the layout may look like this (best viewed with fixed ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: XmForm question

  1. XmForm question


    Suppose a form has two child widgets, W1 and W2 with the following
    attachments

    W1: top, left, bottom : form

    W2: left : W1
    right, top, bottom : form

    so the layout may look like this (best viewed with fixed width font)

    +----------------------+
    | |
    | +------+ +------+ |
    | | W1 | | W2 | |
    | +------+ +------+ |
    | |
    +----------------------+

    If the form is made wider, all the additional space goes to W2

    ======>
    +----------------------------+
    | |
    | +------+ +------------+ |
    | | W1 | | W2 | |
    | +------+ +------------+ |
    | |
    +----------------------------+

    i.e., additional space is always given to children last in a row
    (same goes for additional vertical space which goes to children at
    the bottom).

    My problem is, I'd rather give that space to W1 instead of W2.

    Is that possible with XForm?

    Thanks,
    Don


  2. Re: XmForm question

    On Mar 30, 2:32*pm, Don R. Balken
    wrote:
    > Suppose a form has two child widgets, W1 and W2 with the following
    > attachments
    >
    > * * W1: top, left, bottom : form
    >
    > * * W2: left : W1
    > * * * * right, top, bottom : form
    >
    > so the layout may look like this (best viewed with fixed width font)
    >
    > * * +----------------------+
    > * * | * * * * * * * * * * *|
    > * * | *+------+ *+------+ *|
    > * * | *| *W1 *| *| *W2 *| *|
    > * * | *+------+ *+------+ *|
    > * * | * * * * * * * * * * *|
    > * * +----------------------+
    >
    > If the form is made wider, all the additional space goes to W2
    >
    > * * * * * * * * * * * * * *======>
    > * * +----------------------------+
    > * * | * * * * * * * * * * * * * *|
    > * * | *+------+ *+------------+ *|
    > * * | *| *W1 *| *| * * W2 * * | *|
    > * * | *+------+ *+------------+ *|
    > * * | * * * * * * * * * * * * * *|
    > * * +----------------------------+
    >
    > i.e., additional space is always given to children last in a row
    > (same goes for additional vertical space which goes to children at
    > the bottom).
    >
    > My problem is, I'd rather give that space to W1 instead of W2.
    >
    > Is that possible with XForm?
    >
    > Thanks,
    > * * Don

    Right attach w1 to w2 instead of left attach w2 to w1. This can be
    done using XtSetValues after creating w1 and w2, or by creating w2
    before creating w1.
    --
    Fred Kleinschmidt

  3. Re: XmForm question

    On Mar 31, 10:44*am, fred.l.kleinschm...@boeing.com wrote:
    > On Mar 30, 2:32*pm, Don R. Balken
    > wrote:
    >
    >
    >
    > > Suppose a form has two child widgets, W1 and W2 with the following
    > > attachments

    >
    > > * * W1: top, left, bottom : form

    >
    > > * * W2: left : W1
    > > * * * * right, top, bottom : form

    >
    > > so the layout may look like this (best viewed with fixed width font)

    >
    > > * * +----------------------+
    > > * * | * * * * * * * * * * *|
    > > * * | *+------+ *+------+ *|
    > > * * | *| *W1 *| *| *W2 *| *|
    > > * * | *+------+ *+------+ *|
    > > * * | * * * * * * * * * * *|
    > > * * +----------------------+

    >
    > > If the form is made wider, all the additional space goes to W2

    >
    > > * * * * * * * * * * * * * *======>
    > > * * +----------------------------+
    > > * * | * * * * * * * * * * * * * *|
    > > * * | *+------+ *+------------+ *|
    > > * * | *| *W1 *| *| * * W2 * * | *|
    > > * * | *+------+ *+------------+ *|
    > > * * | * * * * * * * * * * * * * *|
    > > * * +----------------------------+

    >
    > > i.e., additional space is always given to children last in a row
    > > (same goes for additional vertical space which goes to children at
    > > the bottom).

    >
    > > My problem is, I'd rather give that space to W1 instead of W2.

    >
    > > Is that possible with XForm?

    >
    > > Thanks,
    > > * * Don

    >
    > Right attach w1 to w2 instead of left attach w2 to w1. This can be
    > done using XtSetValues after creating w1 and w2, or by creating w2
    > before creating w1.
    > --
    > Fred Kleinschmidt- Hide quoted text -
    >
    > - Show quoted text -


    Just to clarify, make sure you remove the left attachment of W2 to W1,
    otherwise XmForm will probably give up trying to resolve the conflict.
    (Just leave W2's left attachment unspecified.)

+ Reply to Thread