Checkbox¶
Category | Requires | Version |
---|---|---|
User Interface | API 21, Android 5.0 Lollipop | 6 |
Overview¶
Checkbox that raises an event when the user clicks on it. There are many properties affecting its appearance that can be set in the Designer or Blocks Editor.
Events¶
Changed¶
Default Changed event handler.
Click¶
Indicates a user has clicked on the checkbox.
Got Focus¶
Default GotFocus event handler.
Lost Focus¶
Default LostFocus event handler.
Methods¶
Set Shadow¶
Place a blurred shadow of text underneath the text, drawn with the specified x, y, radius, color (e.g. -11, 12, 13, black
Params | |
---|---|
x | Number |
y | Number |
radius | Number |
color | Number |
Properties¶
Background Color¶
Color Default: #FFFFFF00 Read Write - Designer Blocks
Returns the checkbox's background color as an alpha-red-green-blueinteger.
Checkbox Color¶
Color Default: #000000FF Read Write - Designer Blocks
Change the checkbox component color.
Checked¶
Boolean Default: False Read Write - Designer Blocks
Returns true if the checkbox is checked.
Enabled¶
Boolean Default: True Read Write - Designer Blocks
Returns true if the checkbox is active and clickable.
Font Bold¶
Boolean Default: False Write - Designer
Returns true if the checkbox's text should be bold
If bold has been requested, this property will return true, even if thefont does not support bold.
Font Italic¶
Boolean Default: False Write - Designer
Returns true if the checkbox's text should be italic
If italic has been requested, this property will return true, even if thefont does not support italic.
Font Size¶
Number Default: 14.0 Read Write - Designer Blocks
Returns the checkbox's text's font size, measured in sp(scale-independent pixels).
Font Typeface¶
Number Default: 0 Write - Designer
Returns the checkbox's text's font face as default, serif, sansserif, or monospace.
Font Typeface Import¶
Available as Advanced Property
Text Write - Designer Blocks
Set a custom font.
Height¶
Number Read Write - Blocks
Specifies the component's vertical height, measured in pixels.
Height Percent¶
Number Write - Blocks
Specifies the component's vertical height as a percentageof the height of its parent Component.
Text¶
Text Read Write - Designer Blocks
Returns the text displayed by the checkbox.
Text Color¶
Color Default: #000000FF Read Write - Designer Blocks
Returns the checkbox's text color as an alpha-red-green-blueinteger.
Visible¶
Boolean Default: True Read Write - Designer Blocks
Returns true iff the component is visible.
Width¶
Number Read Write - Blocks
Specifies the component's horizontal width, measured in pixels.
Width Percent¶
Number Write - Blocks
Specifies the component's horizontal width as a percentageof the Width of its parent Component.