Flex Basic control-Label Control - Adobe Flex

What is the use of label control?

Label is a UIComponent which renders one or more lines of uniformly-formatted text. Text to be displayed will be determined by the text property inherited from TextBase control.

Class declaration

Below is the declaration for spark.components.Label class:

Public methods

S.N.

Method & Description

1

Label()
Constructor.

Methods inherited

This class inherits methods from the following classes:

  • mx.core.TextBase
  • mx.core.UIComponent
  • mx.core.FlexSprite
  • flash.display.Sprite
  • flash.display.DisplayObjectContainer
  • flash.display.InteractiveObject
  • flash.display.DisplayObject
  • flash.events.EventDispatcher
  • Object

Flex Label Control Example

Let us follow the following steps to check usage of Label control in a Flex application by creating a test application:

Step

Description

1

Create a project with a name HelloWorld under a package com.wisdomjobs.client as explained in the Flex - Create Application chapter.

2

Modify HelloWorld.mxml as explained below. Keep rest of the files unchanged.

3

Compile and run the application to make sure business logic is working as per the requirements.

Following is the content of the modified mxml file src/com.wisdomjobs/HelloWorld.mxml.

After all the changes are done, compile and run the application in normal mode as we did in Flex - Create Application chapter. If everything works fine in the application, it produces below output.

FLEX LABEL

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Adobe Flex Topics