Text Label
Article Metadata
Contents |
Inheritance
Nokia.TextLabel
| - Nokia.Widget
|- Nokia.Class (basic class)
1 - Description
The Text Label component is an element container that supports rich text (HTML) and plain text with the option of automatically wrapping text to fit within the available width over multiple lines.
2 - Visual Design
3 - Component Dependencies
3.1 CSS
<!-- Themeroller CSS --> <link rel="stylesheet" href="themes/themeroller/<theme>/Themeroller.css" type="text/css" media="screen"> <!-- Specific Theme/Resolution CSS --> <link rel="stylesheet" href="/themes/nokia/ext-theme/<theme>/<resolution>/custom.css" type="text/css" media="screen">
3.2 Javascript
<!-- jQuery file --> <script src="/lib/jquery/jQuery.js" type="text/javascript" charset="utf-8"></script> <!-- Guarana file --> <script src="/lib/Guarana.js" type="text/javascript" charset="utf-8"></script>
4 - Functional Specifications/Requirements
4.1 - Options
- element: 'selector'
- jQuery selector or the DOM reference to become the container of the component.
- content: string
- Defines the component content.
- style: Object {}
- Defines the component style. This option is a hash table with CSS properties.
4.2 - Events - Callbacks
- create: function()
- Scope: [this.element]
4.3 - Methods
- getContent: function()
- Returns the component content.
- return [String]
- setContent: function(value)
- Sets the component content.
- return [void]
4.4 - Default options
- content: "
5 - Component Demo
5.1 HTML
<div id="textlabel"></div> <div id="content"> Content <strong>here</strong> </div>
5.2 Javascript
window.textlabel = new Nokia.TextLabel({
element: '#textlabel',
content: '#content',
width: 300,
height: 250,
fontSize: '15px',
});
6 - Nokia WRT Browser Compatibility
| ▴ | S60 3.1 | S60 3.2 | S60 5.0 |
| Text Label | YES | YES | YES |



(no comments yet)