Constructor

new (?parent:DisplayObjectContainer, ?xpos:Float, ?ypos:Float, ?text:String, ?defaultHandler:Dynamic)

Constructor

Parameters:

parent

The parent DisplayObjectContainer on which to add this InputText.

xpos

The x position to place this component.

ypos

The y position to place this component.

text

The string containing the initial text of this component.

defaultHandler

The event handling function to handle the default event for this component (change in this case).

Variables

maxChars:Int

Gets / sets the maximum number of characters that can be shown in this InputText.

password:Bool

Gets / sets whether or not this input text will show up as password (asterisks).

restrict:String

Gets / sets the list of characters that are allowed in this TextInput.

text:String

Gets / sets the text shown in this InputText.

read onlytextField:TextField

Returns a reference to the internal text field in the component.

Methods

draw ():Void

Draws the visual ui of the component.

get_password ():Bool

get_restrict ():String

get_text ():String

get_textField ():TextField

set_enabled (value:Bool):Bool

Sets/gets whether this component is enabled or not.

set_maxChars (value:Int):Int

set_password (value:Bool):Bool

set_restrict (value:String):String

set_text (value:String):String

Inherited Variables

Defined by Component

enabled:Bool

Sets/gets whether this component is enabled or not.

tag:Int

Sets/gets in integer that can identify the component.

Inherited Methods

Defined by Component

get_enabled ():Bool

get_height ():Float

get_tag ():Int

get_width ():Float

move (xpos:Float, ypos:Float):Void

Moves the component to the specified position.

Parameters:

xpos

the x position to move the component

ypos

the y position to move the component

setSize (w:Float, h:Float):Void

Sets the size of the component.

Parameters:

w

The width of the component.

h

The height of the component.

set_height (value:Float):Void

Sets/gets the height of the component.

set_tag (value:Int):Int

set_width (value:Float):Void

Sets/gets the width of the component.

set_x (value:Float):Void

Overrides the setter for x to always place the component on a whole pixel.

set_y (value:Float):Void

Overrides the setter for y to always place the component on a whole pixel.