[comp.windows.x] Widget with Scroll Bar

franks@coracle.cis.ohio-state.edu (Frank Adelstein) (12/22/89)

I need to use a widget that contains text with a scroll bar,
and I'm going to need to append text to it (similar to xterm).

I'm rather confused at what type of widget to use, and how to use it.
I've tried a list widget in a viewport widget and that's fine, 
except the scroll bar doesn't seem to work until the widgets resized.
I've looked at text widgets, but I'm unclear as how to change (add)
text to it with the text sources or whatever (I'd need a string widget, 
since the data won't be on disk).

Does someone know of a good (ok, decent, fair, poor, anything) example
and what widget type(s) would be most useful?  I've looked at
xterm, but it's a bit cryptic to me.

Hope this isn't too dumb.  Reply by mail, since I've got a large backlog
of articles to read, and I doubt this is of general interest.  Thanks.

--Frank Adelstein
  franks@cis.ohio-state.edu

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (01/05/90)

> I need to use a widget that contains text with a scroll bar,
> and I'm going to need to append text to it (similar to xterm).

> I'm rather confused at what type of widget to use, and how to use it.

I would suggest using the R4 Athena AsciiText widget.  If provides memory
managed text, as well as both horizontal and vertical scrolling.

For an example program take a look at "clients/xedit" on the R4 Core
distribution.  This program is a short example of how to build a text editor
using the Athena AsciiText widget.

						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213