Hi folks,

  I've noticed a small but somewhat annoying difference between
Motif (openmotif 2.1.30pl5) and LessTif (0.91.21) regarding
panes with XmList and XmText widgets and I wonder if what I'm
doing is out of bounds with the Motif specification or if it's
a behaviour bug of LessTif:

Basically, I have a PanedWindow, which hosts an XmScrolledList
and an XmScrolledText widget, vertically seperated in that order:

  +----------------------+
  |                      |
  | XmScrolledList       |
  |                      |
  +--------------------@-+  <-- sash
  |                      |
  | XmScrolledText       |
  |                      |
  +----------------------+

Since they happen to be in the main window, I want to give the
application some reasonable space distribution between the
list and the text widget right from start, say, 70% of the space
to the list and the rest for the text widget.

The major problem to solve is, because the list is empty at
program start, it will only occupy 1 line and the text widget
the rest of the paned window.  I cannot use some visibleItemCount
resource on the list, because when the user specifies a different
geometry at the command line, the ratio between the list and text
space would be messed up again, so I have to make the actual heights
of the two widgets at startup dependent on the height of the entire
pane after realization.

As as I understand it, I can only get the pane size after it has
been realized, so I have added a workproc which gets the heights
of the scrolled list (in pixels, the list is 1 line at that point)
and the scrolled text (which occupies the rest), add them, and
then set the list to 70% of the sum, and text to the rest.

This works very well on Motif (1.2.4 or OpenMotif) yet with LessTif
the list widget stays at 1 line size, and depending on whether
I unmanage the main window parent of the pane, or not, the situation
will be the same as initially, or the entire window will resize
itself to adjust to the shrunk text widget.

Is there some way to achieve the desired behaviour with LessTif,
preferrably by using a better method which works equally on both
LessTif and Motif?

        --mkb

Reply via email to