Xbasic

{DATA}

Syntax

{data= Stored_Value } Displayed_Value

Arguments

Stored_Value

Character. The value to generate when the operator selects a list box or tree control item.

Displayed_Value

Character. The value to display in the list box or tree control.

Description

The {DATA} command is used to modify an entry in a list of choices?. It allows you to display one value in a list box or tree control, yet store a different value.

Example

list = <<%a%
{data=R}Red
{data=G}Green
{data=B}Blue
%a%
'Note: selected MUST be dimmed as 'C'. If you DIM
'selected as N, then it returns the index position of the selection
'and NOT the value in the {data} directive
dim selected as c
selected = "G"
ui_dlg_box("test",<<%dlg%
[%O={@@}%.30,3selected^#list];
selected value: [.10selected];
%dlg%)

Limitations

Desktop applications only

See Also