Rich UI TextArea
A Rich UI textArea widget defines a rectangle containing one or more lines of text.
Here is example code:
package myPkg;
import com.ibm.egl.ui.rui.Event;
import com.ibm.egl.rui.widgets.RadioButton;
import com.ibm.egl.rui.widgets.TextArea
handler MyHandler type RUIHandler{initialUI =[myTextArea, myRadioGroup]}
myTextArea TextArea{
text = "Monday? I'm really busy on Monday. How about Tuesday?",
numColumns = 15,
numRows = 5};
myRadioGroup RadioGroup{
groupName = "abc",
options =["Monday", "Tuesday"],
onClick ::= myRadio};
function myRadio(e Event in)
if (myRadioGroup.selected == "Tuesday")
myTextArea.text = "No, on Monday!";
else
myTextArea.text = "No, on Tuesday!";
end
end
endThe following properties are supported:
- numColumns, which holds an integer that represents the number of columns in the text area
- numRows, which holds an integer that represents the number of rows in the text area
- readOnly, which holds a Boolean that indicates whether the text area is protected from user input
- text, which holds a string for display in the text area
The following functions are available, none of which returns a
value:
- append adds content to the content already in the text area. The only parameter is the string to be added.
- select causes the widget to receive focus and, on most browsers, selects the text. The function has no parameters.
- setRedraw redraws the text area. The only parameter is a Boolean, which indicates whether or not to redraw the area.
Supported properties and functions are described in “Widget properties and functions.”
Use of this widget requires the following statement:
import com.ibm.egl.rui.widgets.TextArea;