org.symbian.wrttools.doc.WRTKit/html/WRTKit_Label_Class-GUID-64730e7f-835f-443a-9322-6753fa72fd09.html
author tasneems@symbian.org
Thu, 04 Mar 2010 15:42:37 -0800
changeset 220 41890dfa56f5
permissions -rw-r--r--
Fixed 2046 - added support for WRTKit help

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xml:lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="(C) Copyright 2005" />
<meta name="DC.rights.owner" content="(C) Copyright 2005" />
<meta content="concept" name="DC.Type" />
<meta name="DC.Title" content="WRTKit Label Class" />
<meta scheme="URI" name="DC.Relation" content="WRTKit_API_Reference-GUID-00e47c27-0a1a-443f-ae85-cf3381635170.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="GUID-64730E7F-835F-443A-9322-6753FA72FD09" name="DC.Identifier" />
<meta content="en" name="DC.Language" />
<link href="commonltr.css" type="text/css" rel="stylesheet" />
<title>
WRTKit Label Class</title>
</head>
<body id="GUID-64730E7F-835F-443A-9322-6753FA72FD09"><a name="GUID-64730E7F-835F-443A-9322-6753FA72FD09"><!-- --></a>



    <h1 class="topictitle1">
WRTKit Label Class</h1>

    <div>

        <div class="section"><h2 class="sectiontitle">
Description</h2>

            
            <p>

                The Label class implements a control that displays a simple piece of text. A label
                is used in situations where there's a caption-value pair that needs to be displayed,
                e.g. "Name: John Smith".
            </p>

            <div class="fignone" id="GUID-64730E7F-835F-443A-9322-6753FA72FD09__GUID-E0AEA2A3-8D91-4211-AECA-B94DC6E75BC9"><a name="GUID-64730E7F-835F-443A-9322-6753FA72FD09__GUID-E0AEA2A3-8D91-4211-AECA-B94DC6E75BC9"><!-- --></a><span class="figcap">Figure 1. 
Label control</span>

                
                <br /><img src="Label_Control_Screenshot_1.png" /><br />
            </div>

        </div>

        <div class="section"><h2 class="sectiontitle">
Inherits from</h2>

            
            <p>

                <a href="WRTKit_Control_Class-GUID-6ddb8154-3fed-40fc-b282-85e6d3ad494f.html">
Control</a>
            </p>

        </div>

    </div>

    <div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="WRTKit_API_Reference-GUID-00e47c27-0a1a-443f-ae85-cf3381635170.html">WRTKit API Reference</a></div>
</div>
</div>
<div class="nested1" id="GUID-5AF89342-2A75-4FA0-8817-B34B40AB0D76"><a name="GUID-5AF89342-2A75-4FA0-8817-B34B40AB0D76"><!-- --></a>

        <h2 class="topictitle2">
Constructor</h2>

        <div>

            <div class="section"><h3 class="sectiontitle">
Syntax</h3>

                
                <pre>
[Label] new Label(String id, String caption, String text)</pre>

            </div>

            <div class="section"><h3 class="sectiontitle">
Description</h3>

                
                <p>

                    Creates a new instance of the Label class.
                </p>

            </div>

            <div class="section"><h3 class="sectiontitle">
Arguments</h3>

                
                <br /><ul>

                    <li>

                        <p>
id</p>

                        

                            <p>

                                Unique identifier for the control. Can be retrieved using the id property defined
                                in the UIElement class that this control inherits from. Useful for example to
                                identify the source of an event in event callback functions or to apply a CSS
                                rule to only this particular control. The identifier can be null, in which case
                                no id will be set for the control.
                            </p>

                        
                    </li>

                    <li>

                        <p>
caption</p>

                        

                            <p>

                                The caption text for the control. A null caption can be used to hide the 
                                caption area. This is not recommended for a label since without a caption
                                the value of the label doesn't make sense to the user.
                                The value is an XHTML string.
                            </p>

                        
                    </li>

                    <li>

                        <p>
text</p>

                        

                            <p>

                                The content for the label. If the argument is omitted or null then the content
                                area will be empty. The value is an XHTML string.
                            </p>

                        
                    </li>

                </ul>

            </div>

            <div class="section"><h3 class="sectiontitle">
Return value</h3>

                
                <p>

                    A new instance of the Label class.
                </p>

            </div>

        </div>

    </div>

    <div class="nested1" id="GUID-7553A084-C1A7-4440-AC95-3CD1F9946419"><a name="GUID-7553A084-C1A7-4440-AC95-3CD1F9946419"><!-- --></a>

        <h2 class="topictitle2">
getText()</h2>

        <div>

            <div class="section"><h3 class="sectiontitle">
Syntax</h3>

                
                <pre>
[String] Label.getText(void)</pre>

            </div>

            <div class="section"><h3 class="sectiontitle">
Description</h3>

                
                <p>

                    Retrieves the current text value of the label.
                    The value is an XHTML string.
                </p>

            </div>

            <div class="section"><h3 class="sectiontitle">
Arguments</h3>

                
                <p>

                    This method does not take any arguments.
                </p>

            </div>

            <div class="section"><h3 class="sectiontitle">
Return value</h3>

                
                <p>

                    The current text value of the label.
                </p>

            </div>

        </div>

    </div>

    <div class="nested1" id="GUID-A253368B-0ACB-4F98-992C-93AE4A11245C"><a name="GUID-A253368B-0ACB-4F98-992C-93AE4A11245C"><!-- --></a>

        <h2 class="topictitle2">
setText()</h2>

        <div>

            <div class="section"><h3 class="sectiontitle">
Syntax</h3>

                
                <pre>
[void] Label.setText(String text)</pre>

            </div>

            <div class="section"><h3 class="sectiontitle">
Description</h3>

                
                <p>

                    Sets the text value of the label.
                    The value is an XHTML string.
                </p>

            </div>

            <div class="section"><h3 class="sectiontitle">
Arguments</h3>

                
                <br /><ul>

                    <li>

                        <p>
text</p>

                        

                            <p>

                                The text to be displayed as the value of the label. Passing null
                                results in no text.
                            </p>

                        
                    </li>

                </ul>

            </div>

            <div class="section"><h3 class="sectiontitle">
Return value</h3>

                
                <p>

                    This method does not return a value.
                </p>

            </div>

        </div>

    </div>


</body>
</html>