A single-line text input field.
The preferred height of a text field is the height of the TextField.TextFieldStyle.font
and TextField.TextFieldStyle.background
. The preferred width of a text field is 150, a relatively arbitrary size.
The text field will copy the currently selected text when ctrl+c is pressed, and paste any text in the clipboard when ctrl+v is pressed. Clipboard functionality is provided via the Clipboard
interface. Currently there are two standard implementations, one for the desktop and one for Android. The Android clipboard is a stub, as copy & pasting on Android is not supported yet.
The text field allows you to specify an TextField.OnscreenKeyboard
for displaying a softkeyboard and piping all key events generated by the keyboard to the text field. There are two standard implementations, one for the desktop and one for Android. The desktop keyboard is a stub, as a softkeyboard is not needed on the desktop. The Android TextField.OnscreenKeyboard
implementation will bring up the default IME.
字段摘要 | |
---|---|
String |
blinkTime
|
String |
color
|
String |
cursorPosition
Sets the cursor position and clears any selection. |
String |
disabled
|
String |
fillParent
If true, this actor will be sized to the parent in Layout.validate() . |
String |
focusTraversal
If true (the default), tab/shift+tab will move to the next text field. |
String |
height
|
String |
layoutEnabled
Enables or disables the layout for this actor and all child actors, recursively. |
String |
maxLength
|
String |
messageText
Sets the text that will be drawn in the text field if no text has been entered. |
String |
name
|
String |
onlyFontChars
When false, text set by setText(String) may contain characters not in the font, a space will be displayed instead. |
String |
originX
|
String |
originY
|
String |
passwordCharacter
Sets the password character for the text field. |
String |
passwordMode
|
String |
rightAligned
|
String |
rotation
|
String |
scale
|
String |
scaleX
|
String |
scaleY
|
String |
skin
|
String |
styleName
|
String |
text
|
String |
touchable
|
String |
visible
|
String |
width
|
String |
x
|
String |
y
|
String |
z-index
|
方法摘要 |
---|
子事物摘要 | |
---|---|
|
actions
|
字段详细信息 |
---|
Sets the cursor position and clears any selection.
If true, this actor will be sized to the parent in Layout.validate()
.
If true (the default), tab/shift+tab will move to the next text field.
Enables or disables the layout for this actor and all child actors, recursively.
Sets the text that will be drawn in the text field if no text has been entered.
When false, text set by setText(String)
may contain characters not in the font, a space will be displayed instead.
Sets the password character for the text field.
方法详细信息 |
---|
子事物详细信息 |
---|