From: 6500mack@ucsbuxa.ucsb.edu (Michael P. Mack)
Newsgroups: comp.windows.x.motif
Subject: Help with RowColumn alignment
Keywords: RowColumn
Date: 29 Aug 92 21:41:36 GMT

I'm trying to create an input section of a program that that has
a Label and a Text widget side-by-side.  Since there are many inputs,
I decided to use a RowColumn container for alignment.  This turned
out to be unacceptable since the Text widgets were created as large
as the largest Label in the first column:

    -----------------------------------------------------------
    |  -------------------------   -------------------------  |
    |  |                       |   |                       |  |
    |  |       Label 1         |   |        Text 1         |  |
    |  |                       |   |                       |  |
    |  -------------------------   -------------------------  |
    |                                                         |
    |  -------------------------   -------------------------  |
    |  |                       |   |                       |  |
    |  |       Label 2         |   |        Text 2         |  |
    |  |                       |   |                       |  |
    |  -------------------------   -------------------------  |
    |                                                         |
    |  -------------------------   -------------------------  |
    |  |                       |   |                       |  |
    |  |       Label 3         |   |        Text 3         |  |
    |  |                       |   |                       |  |
    |  -------------------------   -------------------------  |
    -----------------------------------------------------------

So instead of using a single RowColumn, I used two and have run into
a different problem which has become rather annoying.  Now the Text
widgets are of the correct width, but the Labels no longer line up
with the Text widget that they refer to:

  -----------------------------------------------------------
  | ------------------------------- ----------------------- |
  | |  -------------------------  | |  -----------------  | |
  | |  |       Label 1         |  | |  |               |  | |
  | |  -------------------------  | |  |    Text 1     |  | |
  | |  -------------------------  | |  |               |  | |
  | |  |       Label 2         |  | |  -----------------  | |
  | |  -------------------------  | |                     | |
  | |  -------------------------  | |  -----------------  | |
  | |  |       Label 3         |  | |  |               |  | |
  | |  -------------------------  | |  |    Text 2     |  | |
  | |                             | |  |               |  | |
  | |                             | |  -----------------  | |
  | |                             | |                     | |
  | |                             | |  -----------------  | |
  | |                             | |  |               |  | |
  | |                             | |  |    Text 3     |  | |
  | |                             | |  |               |  | |
  | |                             | |  -----------------  | |
  | ------------------------------- ----------------------- |
  -----------------------------------------------------------

Both RowColumn widgets are children of a Form with attachments set to
XmATTACH_FORM on all sides (except the inner attachment where RowCol2
is attached to RowCol1).  I tried setting up RowCol1 as XmHORIZONTAL
with 3 columns, but the result was that Label3 expanded to fill all of
the space below Label2 which was left unchanged.  I expected this to
work since XmNpacking is set to XmPACK_COLUMN which says it puts all
the children into identically sized boxes.

Does anybody know how to fix this?


ecnavdA nI sknahT

Mike Mack
6500mack@ucsbuxa.ucsb.edu