Label¶
Category | Requires | Version |
---|---|---|
User Interface | API 21, Android 5.0 Lollipop | 10 |
Overview¶
A Label displays a piece of text, which is specified through the Text
property. Other properties, all of which can be set in the Designer or Blocks Editor, control the appearance and placement of the text.
Events¶
Click¶
Event to detect that a user has done a simple "Click".
Long Click¶
Event to detect that a user has done a simple "Long Click".
Methods¶
Set Animation Style¶
Allows you to set animation style. Valid (case-insensitive) values are: ChasingDots, Circle, CubeGrid, DoubleBounce, FadingCircle, FoldingCube, Pulse, RotatingCircle, RotatingPlane, ThreeBounce, WanderingCubes, Wave. If invalid style is used, animation will be removed.Position can be: top, left, right, bottom. Size can be 100.
Params | |
---|---|
style | Text |
position | Text |
size | Number |
color | Number |
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
Property for BackgroundColor
Clickable¶
Boolean Default: False Read Write - Designer Blocks
Set the component clickable or not clickable.
Font Bold¶
Boolean Default: False Write - Designer
Property for FontBold
Font Italic¶
Boolean Default: False Write - Designer
Property for FontItalic
Font Size¶
Number Default: 14.0 Read Write - Designer Blocks
Property for FontSize
Font Typeface¶
Number Default: 0 Write - Designer
Property for FontTypeface
Font Typeface Import¶
Available as Advanced Property
Text Write - Designer Blocks
Set a custom font.
Has Margins¶
Available as Advanced Property
Boolean Default: True Read Write - Designer Blocks
Reports whether or not the label appears with margins. All four margins (left, right, top, bottom) are the same. This property has no effect in the designer, where labels are always shown with margins.
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.
HTML Format¶
Available as Advanced Property
Boolean Default: False Write - Designer
If true, then this label will show html text else it will show plain text. Note: Not all HTML is supported.
Marquee¶
Available as Advanced Property
Boolean Default: false Read Write - Designer Blocks
Property for Marquee
Max Lines¶
Available as Advanced Property
Number Default: 2147483647 Write - Designer Blocks
Property for MaxLines
Rotation Angle¶
Available as Advanced Property
Number Default: 0.0 Read Write - Designer Blocks
Sets the degrees that the label is rotated around the pivot point. Increasing values result in clockwise rotation.
Text¶
Text Read Write - Designer Blocks
Property for Text
Text Alignment¶
Number Default: 0 Write - Designer
Property for TextAlignment
Text Color¶
Color Default: #000000FF Read Write - Designer Blocks
Property for TextColor
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.