[comp.windows.x] my world is colapsing, help!

bill@gothamcity.jsc.nasa.gov (Bill Shirley) (05/21/91)

Does anyone have some insight...

I am making a widget, subclassed from simple.  It is displaying multi lined
text (in multiple fonts and colors).  I am currently testing it inside of
a viewport (Athena) widget, that is inside of a Box (Athena) widget. I.E.

			Box
			 |
		      Viewport
			 |	
		      myWidget

When text is added to the widget, instead of drawing the new text in the
public procedure, I call the expose method directly (out of laziness, I
intend to change it after it is working).  Should I not directly call
this function?

Inside the expose method (Redisplay), if the text overflows the size of the
widget (i.e. it not tall enough), then XtMakeGeometryRequest is called
requesting that only the height be increased.  The problem occurring here is
that XtMakeGeometryRequest returns XtGeometryAlmost with a suggestion that
the width be 15 pixels more narrow.  If I subsequently call
XtMakeGeometryRequest with it's own suggestion it returns XtGeometryAlmost
again with yet another 15 pixels removed.

I tried using XtSetValues to set the height to be taller, and the same
problem ocurred.  When the widget tried to make itself taller, it collapsed 
into 0 width.

Does anyone know what I'm doing wrong, or has anyone experienced something
similar?

Also, any program design hints will be humbly accepted.

	-thanks in advance-

     ____     ____       ____			Bill Shirley
    / ___|   / ___|     / ___|			bill@gothamcity.jsc.nasa.gov
   |_|      |_|ciences |_|			_______________________________
    _omputer     _      _			Opinions expressed are obtained|
   | |___    ___| |    | |___orporation		by a room full of immortal apes|
    \____|  |____/      \____|			with unbreakable typewriters.  |
  						~~~~~~~~~~~DISCLAIMER~~~~~~~~~~~