[comp.windows.x] text buffer size in text widget

Rick.Kazman@CAD.CS.CMU.EDU (05/01/89)

I have the following problem, and I assume that it's because I'm overlooking
something incredibly obvious (as usual).  I am using a text widget to both
display text and to enter text into (i.e., the contents of the buffer can be
changed by either the user or the program).  

I allocate a text buffer and pass its address to the widget.  When the
program changes the contents of the text buffer, it simply redraws the
widget, and the new data appears, as expected.  However, when the *user*
enters a string of a certain size, say one character, it seems that X then
thinks that that is the length of the text buffer, even when the program
attempts to set the length to something different, by setting XtNlength.
So, in this case, when the program then tries to display a longer string in
the text buffer, only the first character of it appears.  So, my question
is, why does X think that it knows where the end of the string is, and how
can I override this behavior?

Oh yes, I'm running X11R3 on a Sun/3.

Thanks.  rick