Arbortext Command Language > Functions by Alphabetical Listing > dlgitem_set_value
  
dlgitem_set_value
dlgitem_set_value (window, dlgitem, value)
Sets the VALUE attribute of the dlgitem to value. If window is invalid, if dlgitem does not exist within window, or if value does not contain a value of the appropriate type, $ERROR is set and 0 is returned. If successful, the function returns a one (1).
window — The window identifier.
dlgitem — The value of the control's id attribute.
value — String data for the VALUE attribute.
For checkboxes, the value is 0 or 1 for two-state checkboxes and 0, 1, or -1 for tri-state checkboxes. For tri-state checkboxes, -1 is the indeterminate state.
For menuitems and radiobuttons, the value is 0 or 1. 0 is unchecked and 1 is checked.
For comboboxes, listboxes, tablecontrols, radiogroups, and tabboxes, the value is a 1-based index of the selected item.
For descriptions, labels, textboxes, unitdimensionboxes, colordropdowns, sliders, spinners, and datetime, the value is a string.
Notes
Calling this function has the same effect as calling the dlgitem_set function on the VALUE attribute of the dialog item.
Examples
$ret = dlgitem_set_value($win, "TextField", "Machu Pichu")
This function can be used to set the active tab of a tabbox control.
LINK_NOTEBOOK = "id"
# tab_value is an integer, which represents the 1-based
# position of the tabs by counting from left to right
# within the notebook.
function activate_tab(win, tab_value) {
dlgitem_set_value(win, LINK_NOTEBOOK, tab_value)
}