PasswordTextBox Component
Properties
backgroundColor The background color of the `PasswordTextBox``. You can choose a color by name in the Designer or in the Blocks Editor. The default background color is 'default' (shaded 3-D look).
Data type: color |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" backgroundColor="FF901219"> |
Code Writeable | true |
passwordtextboxName.backgroundColor = "FF901219" |
Code Readable | true |
let variable = passwordtextboxName.backgroundColor |
enabled If set, user can enter text into the PasswordTextBox.
Data type: boolean |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" enabled="true"> |
Code Writeable | true |
passwordtextboxName.enabled = true |
Code Readable | true |
let variable = passwordtextboxName.enabled |
fontBold Specifies whether the text of the PasswordTextBox should be bold. Some fonts do not support bold.
Data type: boolean |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" fontBold="true"> |
Code Writeable | false | |
Code Readable | false |
fontItalic Specifies whether the text of the PasswordTextBox should be italic. Some fonts do not support italic.
Data type: boolean |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" fontItalic="true"> |
Code Writeable | false | |
Code Readable | false |
fontSize Specifies the text font size of the PasswordTextBox, measured in sp(scale-independent pixels).
Data type: number |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" fontSize="24"> |
Code Writeable | true |
passwordtextboxName.fontSize = 24 |
Code Readable | true |
let variable = passwordtextboxName.fontSize |
fontTypeface The text font face of the PasswordTextBox. Valid values are 0 (default), 1 (serif), 2 (sans serif), or 3 (monospace).
Data type: number |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" fontTypeface="monospace"> |
Code Writeable | false | |
Code Readable | false |
height Specifies the PasswordTextBox's vertical height, measured in pixels.
Data type: number |
||
Designer Writable | false | |
Code Writeable | true |
passwordtextboxName.height = 64 |
Code Readable | true |
let variable = passwordtextboxName.height |
heightPercent Specifies the PasswordTextBox's vertical height as a percentage of the Screen's Height.
Data type: number |
||
Designer Writable | false | |
Code Writeable | true |
passwordtextboxName.heightPercent = 25 |
Code Readable | false |
hint PasswordTextBox hint for the user.
Data type: string |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" hint="Test hint"> |
Code Writeable | true |
passwordtextboxName.hint = "Test hint" |
Code Readable | true |
let variable = passwordtextboxName.hint |
numbersOnly If true, then this PasswordTextBox`` accepts only numbers as keyboard input. Numbers can include a decimal point and an optional leading minus sign. This applies to keyboard input only. Even if NumbersOnly is true, you can set the text to anything at all using the [Text`](#PasswordTextBox.Text) property.
Data type: boolean |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" numbersOnly="true"> |
Code Writeable | true |
passwordtextboxName.numbersOnly = true |
Code Readable | true |
let variable = passwordtextboxName.numbersOnly |
passwordVisible Specifies whether the password is hidden (default) or shown.
Data type: boolean |
||
Designer Writable | false | |
Code Writeable | true |
passwordtextboxName.passwordVisible = true |
Code Readable | true |
let variable = passwordtextboxName.passwordVisible |
text The text in the PasswordTextBox, which can be set by the programmer in the Designer or Blocks Editor, or it can be entered by the user (unless the Enabled property is false).
Data type: string |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" text="Test text"> |
Code Writeable | true |
passwordtextboxName.text = "Test text" |
Code Readable | true |
let variable = passwordtextboxName.text |
textAlignment Specifies the alignment of the PasswordTextBox's text. Valid values are 'left', 'right' and 'center'.
Data type: string |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" textAlignment="center"> |
Code Writeable | false | |
Code Readable | false |
textColor Specifies the text color of the PasswordTextBox as an red-green-blue-alpha RRGGBBAA or red-green-blue RRGGBB string.
Data type: color |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" textColor="FF07bb70"> |
Code Writeable | true |
passwordtextboxName.textColor = "FF07bb70" |
Code Readable | true |
let variable = passwordtextboxName.textColor |
visible Specifies whether the PasswordTextBox should be visible on the screen. Value is true if the PasswordTextBox is showing and false if hidden.
Data type: boolean |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" visible="true"> |
Code Writeable | true |
passwordtextboxName.visible = true |
Code Readable | true |
let variable = passwordtextboxName.visible |
width Specifies the horizontal width of the PasswordTextBox, measured in pixels.
Data type: number |
||
Designer Writable | false | |
Code Writeable | true |
passwordtextboxName.width = 120 |
Code Readable | true |
let variable = passwordtextboxName.width |
widthPercent Specifies the horizontal width of the PasswordTextBox as a percentage of the Screen's Width.
Data type: number |
||
Designer Writable | false | |
Code Writeable | true |
passwordtextboxName.widthPercent = 80 |
Code Readable | false |
class The styling class of the the component
Data type: string |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" class="Test class"> |
Code Writeable | false | |
Code Readable | false |
id The styling id of the the component
Data type: string |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" id="Test id"> |
Code Writeable | false | |
Code Readable | false |
name The name of the component that will be used to refer to it in code.
Data type: string |
||
Designer Writable | true |
<passwordtextbox name="passwordtextboxName" name="testComponent"> |
Code Writeable | false | |
Code Readable | false |
Methods
Method name | Description | Parameters | ||||
---|---|---|---|---|---|---|
requestFocus |
Request focus to current PasswordTextBox. passwordtextboxName.requestFocus() |
|
||||
addEventListener |
Method used to create event listeners. See Events below for samples. |
|
Events
Event name | Description | Parameters |
---|---|---|
gotFocus | Event raised when the PasswordTextBox is selected for input, such as by the user touching it.passwordtextboxName.addEventListener( "gotFocus", function () { //Your code here } ) |
|
lostFocus | Event raised when the PasswordTextBox is no longer selected for input, such as if the user touches a different text box.passwordtextboxName.addEventListener( "lostFocus", function () { //Your code here } ) |
|