new TextBox(options)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Mixes In:
- ColorMixin
- Source:
Extends
- VisualStim
Members
(protected) _addEventListeners
Add event listeners to text-box object. Method is called internally upon object construction.
- Source:
(protected) _getDefaultLetterHeight
Get the default letter height given the stimulus' units.
- Source:
clear
Clears the current text value.
- Source:
getText
For accessing the underlying input value.
- Source:
reset
Clears the current text value or sets it back to match the placeholder.
- Source:
setAlignment
Setter for the alignment attribute.
- Source:
setAnchor
Setter for the anchor attribute.
- Source:
setBorderColor
Setter for the borderColor attribute.
- Source:
setColor
Setter for the color attribute.
- Source:
setFillColor
Setter for the fillColor attribute.
- Source:
setFitToContent
Setter for the fitToContent attribute.
- Source:
setFont
Set the font for textbox.
- Source:
setLetterHeight
Set letterHeight (font size) for textbox.
- Source:
setSize
Setter for the size attribute.
- Source:
setText
For tweaking the underlying input value.
- Source:
Methods
(protected) _estimateBoundingBox()
Estimate the bounding box.
- Source:
(protected) _getAnchor() → {Array.<number>}
Convert the anchor attribute into numerical values.
- Source:
Returns:
- the anchor, as an array of numbers in [0,1]
- Type
- Array.<number>