A Rich UI list widget defines a list from which the user can select a single entry.
import com.ibm.egl.rui.widgets.List;
import com.ibm.egl.rui.widgets.TextField;
import egl.ui.rui.Event;
Handler MyHandler Type RUIHandler
{ initialUI = [myList, myTextField]}
myList List
{
values = ["one", "two", "three", "four"],
selection = 2, onChange ::= changeFunction
};
myTextField TextField
{text = myList.values[myList.selection]};
Function changeFunction(e Event in)
myTextField.text = myList.values[myList.selection];
end
end
The first string in the array is at position 1, not 0.
Initially, only the last strings are displayed.
If you do not set the size property, Internet Explorer 6 displays the widget as a combo box (a combination text box and list box).
Other supported properties and functions are described in “Widget properties and functions.”
import com.ibm.egl.rui.widgets.List;