[comp.windows.x.motif] XmForm, XtWindow

smiles@ferrari.nmc.ed.ray.com (Kevin Ruddy) (05/24/91)

In my manual page entry for the XmForm widget, it says that XmNrightWidget
(and left, top, and bottom) should be a Window, not a Widget.  So I've been
trying to use "XtWindow(widget)" in place of just "widget".  But XtWindow
just returns a zero.  Is this because I've managed those widgets but haven't
realized any of them yet?

I have been setting my XmNrightAttachment to XmATTACH_WIDGET and the others
are set to XmATTACH_FORM.  The other widget in the form does the same thing
but specifies XmNleftWidget and XmNleftAttachment (and the appropriate
widget, or should I say, window).

Does anyone have any clues?  Thanks.

Kevin Ruddy
smiles@ferrari.nmc.ed.ray.com

dbrooks@osf.org (05/24/91)

> In my manual page entry for the XmForm widget, it says that XmNrightWidget
> (and left, top, and bottom) should be a Window, not a Widget.

The manuals are, unfortunately, wrong here.  It should say "Widget", as you
expected.

> XtWindow
> just returns a zero.  Is this because I've managed those widgets but haven't
> realized any of them yet?

Either that, or the widget is a gadget.

>I have been setting my XmNrightAttachment to XmATTACH_WIDGET and the others
>are set to XmATTACH_FORM.  The other widget in the form does the same thing
>but specifies XmNleftWidget and XmNleftAttachment (and the appropriate
>widget, or should I say, window).

That is a circular definition.  You should only do one of those.  As a rule of
thumb, if you want widget L to resize when you resize the form, but not widget
R, attach the right side of L to R, and leave R's left side unattached.  If you
want them to split the space between them, attach the inner side of both to 50%
across.  And so on.

David Brooks
Systems Engineering
Open Software Foundation

jon@kitty.austin.ibm.com (Werner) (05/25/91)

In article <9105241228.AA05798@ferrari.nmc.ed.ray.com>, smiles@ferrari.nmc.ed.ray.com (Kevin Ruddy) writes:
|> In my manual page entry for the XmForm widget, it says that XmNrightWidget
|> (and left, top, and bottom) should be a Window, not a Widget.  So I've been
|> trying to use "XtWindow(widget)" in place of just "widget".  But XtWindow
|> just returns a zero.  Is this because I've managed those widgets but haven't
|> realized any of them yet?
|> 
|> I have been setting my XmNrightAttachment to XmATTACH_WIDGET and the others
|> are set to XmATTACH_FORM.  The other widget in the form does the same thing
|> but specifies XmNleftWidget and XmNleftAttachment (and the appropriate
|> widget, or should I say, window).
|> 
|> Does anyone have any clues?  Thanks.
|> 
|> Kevin Ruddy
|> smiles@ferrari.nmc.ed.ray.com

You should be using the widget ID in place of the window ID. I've noticed that
they are using window as the type but it should be widget.
-- 
______________________________________________________________________________
External: 	jon@innerdoor.austin.ibm.com 	512-823-5156
Internal: 	jon@trident1.austin.ibm.com 	 
      ********* These views are my views.  I am not a number. *********