[comp.windows.x] Textwidget problems

rgcote@mit-vax.LCS.MIT.EDU (Rob Cote) (12/17/88)

I am having problems with the Athena text widget. I have tried a number of
different ways of trying to get the text widget to perform according to the
"X Toolkit Athena Widgets -- C Language Interface" document, but it doesn't.

The first problem is that the following code (I have omitted obvious
things like setting argn to zero. This is just a sample.):

  XtSetArg(arg[argn], XtNtextOptions, scrollVertical);
  SummaryWindowText = XtCreateManagedWidget("MyWidget", asciiStringWidgetClass,
					    toplevel, arg, argn);

does *not* create a widget with a vertical scrollbar. The documentation states
that:
"scrollVertical		Puts a scroll bar on the left side of the window."
It just creates a standard text widget.

Also, the textoption scrollOnOverflow claims to "automatically scroll text up
when new text is entered below the bottom (last) line." I am trying to turn
this off. I create a text widget and look at the textoptions value. It is 0,
meaning none of the options are set. Yet when I do a XtTextReplace and there
is no more room in the window, it scrolls the text up and performs the insert
instead of not performing the insert at all. I asked an X consortium person 
(face to face) whether I could turn this off and he said no. The text widget 
won't let you. Why does this text option exist if it isn't really an option?? 

An email response is preferred. Thanks for any help rendered.-- 
and none of this of course will stand when I stand before the man on that great
day of the great divide when all the kings and queens will have their closets
emptied and the bones them bones them dry bones will not fail dead men will 
tell tales and you can laugh I can laugh we can laugh but its not funny -the 77s

xw@infko.UUCP (Randolf Werner (X11 Admin)) (02/28/91)

I am writing a texteditor for X11 Release 4, which is to be something
like a vast improved "xedit". Nevertheless I have added many functions and
a true fileselector to the good old "xedit". But I still have some problems
with the textwidget itself:

    1. How can I improve the scrolling performance of the textwidget ?
       On Sun3 Machines scrolling by Cursor Keys is very very slow and I
       don't believe that I really need a Sparc, 88000 or Mips Architecture
       for doing it better.
    2. How can I define a different text cursor ?
       When I use the "Goto Line Number" function in my editor, I have
       difficulties in finding the insert position, because the Cursor in the
       textwidget is too small.
    3. How can I change the space between lines ?
       The space should be somehow correlated with the fontsize.
       When using big fonts it should be somewhat greater than usual.
    4. When I use the "kill-selection" function of the textwidget by typing
       <Control>w for cutting more than 64kBytes, the textwidget crashes. Is
       there a patch for this problem ?

Perhaps some of my problems are solved in the 17 available patches for
X11R4. I am still using the original version of Release 4. If there is someone
out in Europe or even better in Germany who has these patches, I would like
to get in touch with him.

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Randolf Werner (X11 Admin) FB Informatik, Uni Koblenz,          xw@infko.UUCP
Rheinau 3-4, D-5400 Koblenz, Germany           ...!uunet!mcsun!unido!infko!xw