Skip to Main Content
Volume 7A: XView Programming Manual
book

Volume 7A: XView Programming Manual

by Dan Heller
October 1994
Intermediate to advanced content levelIntermediate to advanced
770 pages
22h 58m
English
O'Reilly Media, Inc.
Content preview from Volume 7A: XView Programming Manual
7.15.5 Text Value
You can set or get the value of a keyboard focus item at any time via PANEL_VALUE. The fol-
lowing call retrieves the value of name_item into name:
Panel_item name_item;
char name[NAME_ITEM_MAX_LENGTH];
...
strcpy(name, (char *)xv_get(name_item, PANEL_VALUE));
Note that name_item should have been created with a PANEL_VALUE_STORED_LENGTH not
greater than NAME_ITEM_MAX_LENGTH so the buffer name will not overflow.
7.16 Numeric Text Items
Panel numeric text items are virtually the same as panel text items except that the value
displayed is of type int. Also, convenience features (such as increment and decrement but-
tons) ease the manipulation of the text string’s numeric value. There is little programmatic
difference between the text item and the numeric text item. You create a numeric text item
using the
PANEL_NUMERIC_TEXT package. You can also set the minimum and maximum
range for the numeric text field by using PANEL_MIN_VALUE and PANEL_MAX_VALUE, respec-
tively.
7.17 Multiline Text Items
Multiline text items are a special type of panel text item that allow a text field to display mul-
tiple lines. You create a multiline text item using the
PANEL_MULTILINE_TEXT package.
Multiline text items use the attribute PANEL_DISPLAY_ROWS to specify the number of rows of
text to display. PANEL_VALUE_DISPLAY_LENGTH specifies the length in characters of a row
in a multiline text field. PANEL_VALUE_D
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 6A: Motif Programming Manual

Volume 6A: Motif Programming Manual

David Brennan, Dan Heller, Paula Ferguson
Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Alejandro Terrazas, John Ostuni, Michael Barlow

Publisher Resources

ISBN: 9780937175873