Hi,

I'm trying to debug a motif-based program (geomview) that has problems
with its ToggleButtonWidgets.  The program once worked okay with
lesstif (using version 0.91.8).  However, with lesstif 0.92.6, the
toggle buttons fail to show up.  The window just shows a blank spot
where the button (and its label) should be.

I poked around the geomview source, and discovered that the toggle
button widgets are created using XtCreateManagedWidget(), with
arguments that include setting XmNwidth and XmNheight to zero.  I
thought that might be suspect, and tried setting the width and height
to 1 and to 10, to no avail.  Why 1 and 10?  Just grasping at straws:
I know nothing of motif programming.

I dug into docs on the openmotif web site today, and discovered that
the motif "Core" base class for the widgets lists the default value
for XmNwidth and XmNheight as "dynamic".  With that clue, I removed
completely the code that sets XmNwidth and XmNheight for the toggle
buttons.  It works!

My theory is that some implementations of motif (such as the
penultimate lesstif?) treat width zero as "unset", and compute the
width from the width of the label or whatnot.  But other
implementations (current lesstif?) treat zero seriously, and give you
a zero-width window to use.

Am I on the right track?  Is *not* setting width and height
the right thing to do here?  

Any insight will be appreciated.  Thanks very much for lesstif!

-Steve

Reply via email to