Skip to Main Content
Volume 6A: Motif Programming Manual
book

Volume 6A: Motif Programming Manual

by David Brennan, Dan Heller, Paula Ferguson
September 1993
Intermediate to advanced content levelIntermediate to advanced
1014 pages
28h 26m
English
O'Reilly Media, Inc.
Content preview from Volume 6A: Motif Programming Manual
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Volume 7A: XView Programming Manual

Volume 7A: XView Programming Manual

Dan Heller

Publisher Resources

ISBN: 9780596000431