Class: Textbox

Textbox

The Textbox class provides a GUI representation of a Textbox.


new Textbox(settings)

Creates an instance of a new Textbox control.

Example:


Parameters:
Name Type Description
settings
Properties
Name Type Argument Default Description
Parent JQuery

Element within which to inject the textbox.

ForFocus Control <optional>
null

Control which should receive focus in place of this one.

ParentControl Control <optional>
null

The containing control.

TabIndex number <optional>
0

The tab index of the control determines which order controls may shift focus via the tab key.

BlockedKeys Array.<number> <optional>
[]

Key codes which should be blocked from input.

Class string <optional>
""

CSS class(es) to apply to the injected textbox, space separated.

DataBinding Object <optional>
null

The data binding to bind the textbox value to.

KeyBlocker Control <optional>
settings.ParentControl

Control which should receive input events from blocked keys.

ParentControl Control <optional>
null

The control which contains the textbox, if applicable.

ReadOnly boolean <optional>
false

Sets whether or not the control is read-only.

Style Object.<string, string> <optional>
{}

CSS style to apply to the injected textbox.

Validator Validator <optional>
Validator

Validator to use in conjunction with the textbox control.

Value string <optional>
""

Value to set in the textbox upon creation.

Mixes In:
Source:

Extends

Members


Parent :JQuery

Element within which the textbox has been injected.

Type:
  • JQuery
Source:

DataBinding :Object

The data binding to which the textbox has been bound.

Type:
  • Object
Source:

Container :JQuery

Root container of textbox control.

Type:
  • JQuery
Source:

KeyBlocker :Control

Control which should receive input events from blocked keys.

Type:
Source:

Editor :Editor

Underlying editor control for the textbox.

Type:
Source:

BlockedKeys :Array.<number>

Key codes which should be blocked from input.

Type:
  • Array.<number>
Default Value:
  • []
Source:

ReadOnly :boolean

Whether or not the control is read-only.

Type:
  • boolean
Default Value:
  • false
Source:

Value :String

Get or set Textbox value.

Type:
  • String
Default Value:
  • ""
Source:

ParentControl :Control

The containing control.

Type:
Inherited From:
Source:

Focusables :Array.<JQuery>

List of elements which should have focus related CSS classes set and events hooked.

Type:
  • Array.<JQuery>
Inherited From:
Source:

Focused :boolean

Whether or not the control actively has focus.

Type:
  • boolean
Inherited From:
Source:

CanGetFocus :boolean

Determines whether or not the control may receive focus.

Type:
  • boolean
Inherited From:
Source:

CanTabFocus :boolean

Determines whether or not the control may receive focus via the tab key.

Type:
  • boolean
Inherited From:
Source:

ControlUniqueID :number

The globally-unique ID of the control.

Type:
  • number
Inherited From:
Source:

Arguments :Array

Arguments used to instantiate the control.

Type:
  • Array
Inherited From:
Source:

ForFocus :Control

Control which should receive focus in place of this one.

Type:
Inherited From:
Source:

TabIndex :number

The tab index of the control determines which order controls may shift focus via the tab key.

Type:
  • number
Inherited From:
Source:

Methods


Activate()

Causes the textbox to receive input focus.

Overrides:
Source:

Deactivate()

Causes the textbox to lose input focus.

Overrides:
Source:

Dispose()

Disposes of the textbox instance and frees up allocated resources.

Overrides:
Source:

Keydown()

Handles the keydown event for the textbox.

Overrides:
Source:

Keypress()

Handles the keypress event for the textbox.

Overrides:
Source:

Keyup()

Handles the keyup event for the textbox.

Overrides:
Source:

Mousedown()

Handles the mousedown event for the textbox.

Overrides:
Source:

Mouseup()

Handles the mouseup event for the textbox.

Overrides:
Source:

Value_get()

Textbox value getter.

Source:

Value_set()

Textbox value setter.

Source:

Blur()

Causes control instance to be blurred and fire off associated events, while bubbling up through containing controls.

Inherited From:
Overrides:
Source:

Focus( [last])

Causes control instance to be focused if available while firing off associated events, while bubbling up through containing controls when the control instance cannot receive focus.

Parameters:
Name Type Argument Default Description
last boolean <optional>
false

Causes focus to bubble down into contained controls.

Inherited From:
Source:

Initialize(args, parentControl, focusables)

Initializes an instance of a control.

Parameters:
Name Type Description
args Array

Arguments used to instantiate derived control.

parentControl Control

Parent control, if applicable.

focusables Array.<JQuery>

Array of focusable elements.

Inherited From:
Source:

Mousewheel(event)

Handles the mousewheel event for a control

Parameters:
Name Type Description
event IJQueryEventObject

The mousewheel event object.

Inherited From:
Source:

Events


onKeyBlock

Callback responsible for handling of blocked keydown events.

Parameters:
Name Type Description
event IJQueryEventObject

The keydown event object.

Source:

onChange

Callback responsible for handling of value change events.

Parameters:
Name Type Description
value string

The validated value of the textbox.

Source:

onResize

Callback responsible for handling of value-based resize events.

Parameters:
Name Type Description
object Textbox

The textbox triggering the event.

width number

The width of the textbox.

height number

The height of the textbox.

Source: