 |
Control API for Text Edit (textEdit)
A multiline region for displaying and editing text. Text in the control
is restricted to a single font, size and style unless set with HTML commands.
The textEdit control has a frame. The size of the frame is defined by
the 'rows' and 'cols' attribute. A vertical scrollbar is displayed permanently.
The scroll bar is enabled when the number of lines exceed the 'rows' attribute.
If the 'wrapping' attribute is not "OFF" the text is wrapped
according to the 'cols' attribute - no horizontal scrollbar. If 'wrapping'
is set to "OFF" a horizontal scrollbar is activated if the text
line length exceeds the width set by the 'cols' attribute.
- cols
Defines width of the textEdit control
in characters. If the text line exceeds the width defined with
the 'cols' attribute and the 'wrapping' attribute if "OFF"
a horizontal scrollbar is activated. The scrollbar is appended to the
textEdit frame, so that the 'rows' attribute stays unchanged.
If 'wrapping' is set to "HARD" or "SOFT" the text
line is wrapped and no horizontal scrollbar is activated.
Be aware that the definition of 'cols' by characters is only an approach
and varies by the used character font. A character font with unequal
spacing shows different results. A i character fits more often into
the textEdit field than a m character.
- id
Identification name of the textEdit.
- text
Defines the string of text displayed.
This text can be edited and/or new text can be added.
- tooltip
Defines the hint of the textEdit which
is displayed as the mouse cursor passes over the textEdit,
or as the mouse button is pressed but not released.
- rows
Defines the height of the textEdit
control in lines. If the text lines exceed the 'rows' attribute
the vertical scrollbar becomes active.
- wrapping
Controls the text flow. "HARD" and "SOFT" are
passed on to the HTML-Output and control how the carriage return is
handled. Web clients handle text wrapping differently. Therefor the
following description cannot be guaranteed on all web clients.
- HARD
Wraps the text at the width set by the 'cols' attribute. A carriage
control is transmitted at every line break.
No horizontal scrollbar is displayed.
- SOFT
Wraps the text at the width set by the 'cols' attribute. No carriage
control is transmitted.
No horizontal scrollbar is displayed.
- OFF
The text line is not wrapped. If the text line length exceeds the
width set by the 'cols' attribute a horizontal scrollbar is displayed.
| attribute |
req. |
values |
default |
case sens. |
JSP taglib |
classlib |
| cols |
no |
Numeric |
35 |
- |
cols="20" |
setCols(20) |
| id |
yes |
String |
none |
yes |
id="Edit_Text" |
|
| text |
no |
String |
none |
no |
text="editable
Text" |
setText("editable
Text") |
| tooltip |
no |
String |
none |
no |
tooltip="PDK
Document" |
setTooltip("PDK
Document") |
| rows |
no |
Numeric |
5 |
- |
rows="10" |
setRows(10) |
| wrapping |
no |
HARD
SOFT
OFF |
HARD |
yes |
wrapping="SOFT" |
setWrapping(TextWrapping.SOFT) |
Example
<hbj:textEdit
id="Edit_Text
text="Text to change - or just add text"
wrapping="SOFT"
tooltip="Edit and/or add text"
rows="10"
cols="30"
/>
Result
|
|