
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