A Rich UI list widget defines a list from which the user can select a single entry.
import org.eclipse.edt.rui.widgets.List; import org.eclipse.edt.rui.widgets.TextField; import eglx.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 field, Internet Explorer 6 displays the widget as a combo box (a combination text box and list box).
Other supported fields and functions are described in the following topics in the EGL Programmer’s Guide: “Rich UI widget fields” and ”Rich UI widget functions.”
import org.eclipse.edt.rui.widgets.List;