[comp.windows.x] Motif Form widget question

toml@ninja.Solbourne.COM (Tom LaStrange) (06/02/90)

I'm trying to learn this Motif thing and I'm cutting my teeth on
the Form widget.  I want to create a Form widget and have three 
children inside like this

	+---------+
	|    A    |
	+---------+
	|    B    |
	+---------+
	|    C    |
	+---------+

If I create the children in the order A,B,C and attach B to A and C to B,
everything works fine.  If I create them in the order C,B,A and attach B
to C and A to B, then the Form widget does not appear to size properly
to hold all the children.  All I see is C unless I resize the thing.

Is this a "feature" of the form widget that I haven't read about
someplace?  Does the Form widget size itself to fit the child with the
largest lower right corner coordinates?  I don't have Motif source so
I can't UTSL.

Thanks,
Tom LaStrange

Solbourne Computer Inc.    ARPA: toml@Solbourne.COM
1900 Pike Rd.              UUCP: ...!{boulder,sun}!stan!toml
Longmont, CO  80501

ben@hpcvlx.cv.hp.com (Benjamin Ellsworth) (06/06/90)

What you are seeing is a known bug in the 1.0 Form widget.  The 1.1
Form widget performs more like you would expect.  Between now and then,
I suggest that you use a more rational widget to "cut your teeth" on.
The BulletinBoard widget would be a good choice.

-----------------------------------------------------------------------
Benjamin Ellsworth      | ben@cv.hp.com                | INTERNET
Hewlett-Packard Company | {backbone}!hplabs!hp-pcd!ben | UUCP
1000 N.E. Circle        | (USA) (503) 750-4980         | FAX
Corvallis, OR 97330     | (USA) (503) 757-2000         | VOICE
-----------------------------------------------------------------------
                     All relevant disclaimers apply.
-----------------------------------------------------------------------

nazgul@alphalpha.com (Kee Hinckley) (06/06/90)

In article <1990Jun1.205443.5062@Solbourne.COM> toml@ninja.Solbourne.COM (Tom LaStrange) writes:
>I'm trying to learn this Motif thing and I'm cutting my teeth on
>the Form widget.  I want to create a Form widget and have three 
You *really* don't want to cut your teeth on the Form widget.  It's
much better for pulling them out.

>If I create the children in the order A,B,C and attach B to A and C to B,
>everything works fine.  If I create them in the order C,B,A and attach B
>to C and A to B, then the Form widget does not appear to size properly
>to hold all the children.  All I see is C unless I resize the thing.
>
>Is this a "feature" of the form widget that I haven't read about

The problem with the Form widget is that it doesn't backtrack.
It places the first thing and then goes forward from there.  It
can extend itself down as new things are added, and it can extend
itself to the right.  However to extend left or up it would have
to go back and change all the previous widget coordinates to be in
new locations - and it doesn't.  I've tried making the modification
myself, but I can't seem to get it to work.

I'm not sure if you'd call that a bug or a feature, but it certainly
should be changed.

I have a Table widget from David Harrison at UCBerkeley that I have
partially Motifized and that I find to be much more useful than
Form, for doing much the same things.  I'll be putting this out
on the net sometime in the few weeks (after Usenix).

						-kee

-- 
Alphalpha Software, Inc.	|	Join the motif mailing list!	|
148 Scituate St.		|	motif[-request]@alphalpha.com	|
Arlington, MA 02174		|---------------------------------------|
--------------------------------|	nazgul@alphalpha.com		|
617/646-7703 (voice/fax)	|	BBS: 617/641-3722		|