Label: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(18 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
[[file:Label.jpg]] | [[file:Label.jpg]] | ||
== Description == | |||
The Label control is used to display text and headings. The text cannot be modified. | The Label control is used to display text and headings. The text cannot be modified. | ||
While a variety of different events are available, the usual response to clicking a | While a variety of different events are available, the usual response to clicking a Label is to call the function <buttonID>_onclick(). | ||
To add a Label to your app, choose the Label icon in the Toolbar, then position it on the Design Screen. Use the Property Editor to set the properties you need. | To add a Label to your app, choose the Label icon in the Toolbar, then position it on the Design Screen. Use the Property Editor to set the properties you need. | ||
== Properties == | |||
Standard [[properties and methods|properties]] are supported, plus: | Standard [[properties and methods|properties]] are supported, plus: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
| align || The horizontal alignment of the text: top, right, or center. | |||
|- | |||
| alignVertical || The vertical alignment of the text: top, center, or bottom. Do not use for multi line labels. Do not use a percentage based height. | |||
|- | |- | ||
| Caption || The caption of the label. Same as textContent. Runtime only. | | Caption || The caption of the label. Same as textContent. Runtime only. | ||
|- | |- | ||
| innerHTML || The text of the title. | | innerHTML || The text of the title in HTML format. Runtime only. | ||
|- | |||
| text || The text of the title. Same as textContent. Runtime only. | |||
|- | |- | ||
| textContent || The text of the title. | | textContent || The text of the title. HTML OK at Design Time. | ||
|} | |} | ||
=== Change the color of a label === | |||
<pre> | |||
Label1.style.color = "red" | |||
</pre> | |||
== Events == | |||
Standard [[events|events]] are supported. However, events are not usually associated with the control. | Standard [[events|events]] are supported. However, events are not usually associated with the control. | ||
[[Category:Language Reference]] | |||
[[Category:Controls]] | |||
[[Category:General]] | |||
[[Category:Common]] |
Latest revision as of 21:53, 5 March 2020
Description
The Label control is used to display text and headings. The text cannot be modified.
While a variety of different events are available, the usual response to clicking a Label is to call the function <buttonID>_onclick().
To add a Label to your app, choose the Label icon in the Toolbar, then position it on the Design Screen. Use the Property Editor to set the properties you need.
Properties
Standard properties are supported, plus:
align | The horizontal alignment of the text: top, right, or center. |
alignVertical | The vertical alignment of the text: top, center, or bottom. Do not use for multi line labels. Do not use a percentage based height. |
Caption | The caption of the label. Same as textContent. Runtime only. |
innerHTML | The text of the title in HTML format. Runtime only. |
text | The text of the title. Same as textContent. Runtime only. |
textContent | The text of the title. HTML OK at Design Time. |
Change the color of a label
Label1.style.color = "red"
Events
Standard events are supported. However, events are not usually associated with the control.