Introduction
Containers Layouts Widgets Miscellaneous

Widgets -> textarea

To create a textarea, use the following syntax:

$tf = textarea("Initial text" [, properties]);

"Initial text" will be the default text in that textarea.

Textareas and textfields have context menus, so you can right click on them for the copy, paste, etc, operations.

Properties

NameArgumentsDescExample
rows Any integer This specifies the number of rows, or the height (visible lines) of the textarea. $t = textarea("", 'rows=100');
cols Any integer This specifies the number of columns, or the width of the textarea. $ta = textarea("", 'cols=45');
state 1 or 0 Specifies the initial state of the textarea. 1 is enabled (also the default), and 0 is disabled. $ta = textarea('Text', 'state=0');
font fontsize fontname This specifies the font. A font size MUST be specified along with the font name. $ta = textarea('Text', 'font=14 Times New Roman');
fontstyle BOLD, ITALIC or NORMAL This specifies the font style. This MUST be used with the font property above. $ta = textarea('Text', 'font=14 Times New Roman', 'fontstyle=BOLD');
linewrap 1 or 0 Enables or disables line wrapping. -
wordwrap 1 or 0 Wordwrap means that if lines are wrapped, the lines will be wrapped by whole words. This must be used together with the linewrap property. -
editable 1 or 0 Makes a textarea editable or uneditable (read only). -
bounds x y w h See Absolute Positioning for more info. -

These properties are optional and can be in any order.

Related commands and functions

enable($textarea)Self-explanatory.
disable($textarea)Self-explanatory.
setText($textarea, string)Sets the text of the textarea to string.
getText($textarea)Returns an array of the text of the textarea.
append($textarea, string)Adds string to end of existing text.
insert($textarea, string, pos)Inserts string at position pos.
- End of page -
Hosted by www.Geocities.ws

1