PasswordTextBox
Definition
Users enter passwords in a password text box component, which hides the text that has been typed in it.
A password text box is the same as the ordinary TextBox
component, except that it does not display the characters typed by the user.
You can get or set the value of the text in the box with the Text
property. If Text
is blank, you can use the Hint
property to provide the user with a suggestion of what to type. The Hint
appears as faint text in the box.
Password text box components are usually used with a Button
component. The user taps the Button
after entering text.
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). - Enabled
- If set, user can enter text into the
PasswordTextBox
. - FontBold
- Specifies whether the text of the
PasswordTextBox
should be bold. Some fonts do not support bold. - FontItalic
- Specifies whether the text of the
PasswordTextBox
should be italic. Some fonts do not support italic. - FontSize
- Specifies the text font size of the
PasswordTextBox
, measured in sp(scale-independent pixels). - FontTypeface
- The text font face of the
PasswordTextBox
. Valid values are0
(default),1
(serif),2
(sans serif), or3
(monospace). - Height
- Specifies the
PasswordTextBox
’s vertical height, measured in pixels. - HeightPercent
- Specifies the
PasswordTextBox
’s vertical height as a percentage of theScreen
’sHeight
. - Hint
PasswordTextBox
hint for the user.- 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
NumbersOnlyis true, you can set the text to anything at all using the [
Text`](#PasswordTextBox.Text) property. - PasswordVisible
- Specifies whether the password is hidden (default) or shown.
- 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 theEnabled
property is false). - TextAlignment
- Specifies the alignment of the
PasswordTextBox
’s text. Valid values are:0
(normal; e.g., left-justified if text is written left to right),1
(center), or2
(opposite; e.g., right-justified if text is written left to right). - TextColor
- Specifies the text color of the
PasswordTextBox
as an alpha-red-green-blue integer. - Visible
- Specifies whether the
PasswordTextBox
should be visible on the screen. Value istrue
if thePasswordTextBox
is showing andfalse
if hidden. - Width
- Specifies the horizontal width of the
PasswordTextBox
, measured in pixels. - WidthPercent
- Specifies the horizontal width of the
PasswordTextBox
as a percentage of theScreen
’sWidth
.