Single or multiline editing is controlled through the XmNeditMode resource. The value of the resource can be either
XmSINGLE_LINE_EDIT or XmMULTI_LINE_EDIT. While the two editing modes are quite different in concept, it
should be quite intuitive when to use the different modes. Single−line text entry areas are commonly used to prompt
for file and directory names, short phrases, or single words. They are also useful for command−line entry in
applications that were originally based on a tty−style interface. Multiline editing is used for editing files or other large
quantities of text.
15.2.3 Scrollable Text
The layout of a multiline Text widget can be difficult to manage, especially if the text is editable by the user. An
application needs to decide how many lines of text are displayed, how to handle the layout when the user adds new
text, and how to deal with resizing the Text widget. The easiest way to manage an editable multiline Text widget is to
create it as part of a ScrolledText compound object. The ScrolledText object is not a widget class in and of itself, but
rather a compound object that is composed of a Text widget and a ScrolledWindow widget.
When you create a ScrolledText object, the ScrolledWindow automatically handles scrolling the text in the Text
widget. Basically, the two widget classes have hooks and procedures that allow them to cooperate intelligently with
each other. As of Motif 1.2, the performance of the ScrolledText object has improved considerably. One unfortunate ...