[comp.windows.x] Did I miss something to deal with the text widget?

yt07+@ANDREW.CMU.EDU (Yin-Cheng Tsai) (09/02/88)

I try to figure out the I/O control of the string input on the text widget.
However, no matter how I imagine, I can't screw up all the stuff.

Question 1.
  The text widget only accepts 100 characters, which are caused by InsertChar
  procedure (#define STRBUFSIZE 100).  Why can't I type more char's into
  the widget?  Does that mean the widget can only accept 100 char's totally?

Question 2.
  The newline procedure in text widget does nothing about string output.  How
  can I get the string displayed on that widget right after I press the ENTER
  key?  I need to parse that string to get what the user needs.


Question 3.
  Doesn't SUN4/260 support the TrueColor?  What classes of the visuals does
  it support?  I am curious about that.

Thank all the friends on the xpert board.  You all are so kind.

                                -- tsai  yt07+@andrew.cmu.edu

swick@athena.mit.EDU (Ralph R. Swick) (09/06/88)

     Date:  Thu,  1 Sep 88 16:39:54 -0400 (EDT)
     From:  Yin-Cheng Tsai <yt07+@andrew.cmu.edu>

I assume you're referring to the Athena text widget...

       The text widget only accepts 100 characters

Right default, wrong analysis.  You must set the length resource (XtNlength)
if you want other than the default value.

       The newline procedure in text widget does nothing about string output.  How
       can I get the string displayed on that widget right after I press the ENTER
       key? 

You need to override the translation binding for ENTER and register
a global action procedure.

       How to create an AsciiDiskWidget?  I assign a string (char *) onto the
       XtNfile argument.  But the program runs into a fatal error

Your description of your code sounds correct.