![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
You can transform a TextInput component horizontally both while authoring and at runtime. While authoring, select the component on the Stage and use the Free Transform tool or any of the Modify > Transform commands. At runtime, use UIObject.setSize()
or any applicable properties and methods of the TextInput class.
When a TextInput component is resized, the border is resized to the new bounding box. The TextInput component doesn't use scroll bars, but the insertion point scrolls automatically as the user interacts with the text. The text field is then resized within the remaining area; there are no fixed-size elements in a TextInput component. If the TextInput component is too small to display the text, the text is clipped.
The TextInput component has its backgroundColor
and borderStyle
style properties defined on a class style declaration. Class styles override _global styles, therefore, if you want to set the backgroundColor
and borderStyle
style properties, you must create a different custom style declaration or on the instance.
A TextInput component supports the following styles:
Style |
Description |
---|---|
color
|
The default color for text. |
embedFonts
|
The fonts to embed in the document. |
fontFamily
|
The font name for text. |
fontSize
|
The point size for the font. |
fontStyle
|
The font style, either "normal",or "italic". |
fontWeight
|
The font weight, either "normal" or "bold". |
textAlign
|
The text alignment: either "left", "right", or "center". |
textDecoration
|
The text decoration, either "none" or "underline". |
The TextArea component uses the RectBorder class to draw its border. You can use the setStyle()
method (see UIObject.setStyle()
) to change the following RectBorder style properties:
RectBorder styles |
---|
borderColor
|
highlightColor
|
borderColor
|
shadowColor
|
borderCapColor
|
shadowCapColor
|
shadowCapColor
|
borderCapColor
|
The style properties set the following positions on the border:
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |