Label: Difference between revisions
Jump to navigation
Jump to search
C185driver (talk | contribs) |
|||
Line 5: | Line 5: | ||
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. | ||
To get rid of the white text shadowing when displaying on coloured backgrounds | To get rid of the white text shadowing when displaying on coloured backgrounds, put <code>text-shadow: 0;</code> in the label's style property (jQuery Mobile) or set the ''class'' property to empty. | ||
== Properties == | == Properties == |
Revision as of 12:15, 1 January 2014
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.
To get rid of the white text shadowing when displaying on coloured backgrounds, put text-shadow: 0;
in the label's style property (jQuery Mobile) or set the class property to empty.
Properties
Standard properties are supported, plus:
Caption | The caption of the label. Same as textContent. Runtime only. |
innerHTML | The text of the title in HTML format. Runtime only. |
textContent | The text of the title. |
verticalAlign | The vertical alignment of the text: top, center, or bottom. Do not use for multi line labels. Do not use a percentage based height. |
Change the color of a label
Label1.style.color = "red"
Events
Standard events are supported. However, events are not usually associated with the control.