Custom Component : Indicator Label or ILabel

First i must tell that using the Form and its children components like the FormItem,FormHeader are very use full as they touch our requirement in all means, like they control the layout,validating the fields,mark/unmark fields.. and many more.So while working on i came across a requirement to mark my Label as a symbol of Compulsory Field[a RED asterisk] for the TextInputs next to it,more or like the indicator in the FormItem which is a child component of the Form Container. So i thought of using the FormItem itself but its not possible, its only a child component in the Form Container, means i cannot individually use that.I just want a Label With the Indication as Compulsory field[asterisk].So how to achieve this ??.

My second thought was to search the WEB ,may be some one might had the same requirement and done a Custom Component for it. But believe me i found nothing and nothing.

Then my Third thought was to make one. I Called It “Indicator Label” or ILabel.

So i created one , it came out very clean and as i required and its very much similar to the FormItem which is a sub-Class of Container Class and my ILabel is just sub-Class of the Label Class. There is much difference between the Container and the Label.

Description:

It has the following properties with Label Component Properties:

indicatorSkin –>refers to the skin used for the indication, Programmatic Skin or Graphical Skin.

indicatorGap–>refers to the Gap between the indicator and the Label text.

required–>indicator is required or not.default value true.

requiredChanged–>Event for the required property value change.

That’s my requirement.Just a Label with all these properties.Finally made it.

Now just sit back and enjoy this example.

Run demo.

Enjoy the Post. 🙂 , Leave any Comments for queries.

Advertisements

4 Responses to Custom Component : Indicator Label or ILabel

  1. In the Flex Framework naming Conventions; an I in front of a class name usually refers to an interface. As such ILabel is probably a less descriptive name than IndicatorLabel.

    Beyond that, do you have downloadable coponent and/or view source option on your demo?

  2. Not that I’m impressed a lot, but this is more than I expected for when I found a link on Digg telling that the info here is awesome. Thanks.

  3. dan says:

    worshippers require source code :/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: