[comp.windows.x.motif] XmMainWindow Problem

twl@cadreri.UUCP (Todd W. Lainhart) (05/15/91)

I've read the FAQ, the buglist that came with Motif 1.1, and the past couple
months of News in comp.windows.x.motif.  I'm at a loss as to how to go
about fixing my problem.  I'm running Motif 1.1 on a DECStation 5000.

I'm simply trying to create a fully loaded XmMainWindow.  A menubar spans
the top, followed by a work area (frame->drawingArea->scrollBars), followed
by a command window, and then a message window (label).  The problem is,
if I include a message window with the main window, the work area fails
to show up.  It doesn't matter what type of widget I choose for either
the work area or the message window.

The logic goes like this:
    Create and manage XmMainWindow
    Create and manage XmCommand (setting a prompt string and visible items) 
        child of XmMainWindow
    Create and manage an XmLabel (setting alignment and string)
        child of XmMainWindow
    Create and manage the XmFrame, XmDrawingArea, and XmScrollBars
        Frame is child of XmMainWindow, DrawingArea is child of Frame,
        and ScrollBars are children of XmMainWindow
    Via XtSetArg and XtSetValue, set the appropriate resources 
        for XmMainWindow, referencing all of the above widgets.

It doesn't seem to matter if I set the resources via XtSetArg or
XmMainWindowSetAreas (which, by the way, excludes the setting of
the message window) - I still can't get the work area and message window
to display simultaneously.

Does anyone have experience with this sort of thing.  Should I fiddle
around with managing these widgets at different times in their lifecycle?

I've considered dropping this widget (XmMainWindow), and using XmForm,
but I like the way the menubar will rearranging it's children in row/column
order, when managed by XmMainWindow (that is, when the window size is
reduced).  I can't seem to get XmForm to do anything but clip away the
menubar when it is reduced.  Is there a way around this?

If this is a bug in XmMainWindow (I recall reading that someone said
the MainWindow code looked pretty scary) perhaps this is fixed in
1.1.1?  Thanks for any help.

    -- Todd