Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6983737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:27:31+00:00 2026-05-27T18:27:31+00:00

I want to know that how to create a CustomComponent and how to use

  • 0

I want to know that how to create a CustomComponent and how to use that in FLEX Application.
Give me just a simple example, i have little bit of knowledge is there so i can understand if u just give me the code. I am using FLEX 3.0

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:27:32+00:00Added an answer on May 27, 2026 at 6:27 pm

    Nice to see you again.

    Formatted Stepper.as

    package component
    {
    import flash.events.Event;
    import flash.events.FocusEvent;
    import flash.events.MouseEvent;
    
    import mx.controls.NumericStepper;
    import mx.core.mx_internal;
    import mx.events.FlexEvent;
    import mx.formatters.Formatter;
    use namespace mx_internal;
    
    public class FormattedStepper extends NumericStepper {
        // formatter
        private var _formatter:Formatter;
    
        public function FormattedStepper() {
            super();
        }
    
        override protected function createChildren():void {
            super.createChildren();
    
            // un-restrict text input and set initial format
            mx_internal::inputField.restrict = null;
            doFormat();
    
            // event listeners
            addEventListener(FlexEvent.VALUE_COMMIT, doFormat);
            addEventListener(FocusEvent.FOCUS_OUT, doFormat);
            addEventListener(MouseEvent.CLICK, doFormat);
            addEventListener(FlexEvent.DATA_CHANGE, doFormat);
            addEventListener(MouseEvent.MOUSE_DOWN, doFormat);
            mx_internal::nextButton.addEventListener(MouseEvent.CLICK, doFormat);
            mx_internal::nextButton.addEventListener(MouseEvent.MOUSE_DOWN, doFormat);
            mx_internal::prevButton.addEventListener(MouseEvent.CLICK, doFormat);
            mx_internal::prevButton.addEventListener(MouseEvent.MOUSE_DOWN, doFormat);
            mx_internal::inputField.addEventListener(MouseEvent.CLICK, unFormat);
        }       
    
        private function doFormat(event:Event = null):void 
        {
            if ((_formatter != null) && (mx_internal::inputField != null) && (mx_internal::inputField.text != null)) 
            {
                 mx_internal::inputField.text = _formatter.format(value);
            } 
        }
    
        private function unFormat(event:Event = null):void
         {
            if ((_formatter != null) && (mx_internal::inputField != null) && (mx_internal::inputField.text != null))
            {
                 mx_internal::inputField.text = String(value);
            }            
        }
    
        public function set formatter(formatter:Formatter):void {
            _formatter = formatter;
            doFormat();
        }
    }
    }
    

    Test.mxml

    <mx:NumberFormatter id="numberFormatter" precision="2" useNegativeSign="true" rounding="none"/>
    
    <mx:FormItem id="formitemLowerTolerance" label="Lower Tolerance:" labelStyleName="labelFormStyle" direction="horizontal">
                <component:FormattedStepper id="numstepLowerTolerance" width="150" formatter="{numberFormatter}"/>
                <mx:Label id="lblLower" text="%"/>
            </mx:FormItem>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to know that why we need to create setup of the application?
i want to know that when we want to use push notification service.From where
I want to use push notification in my app.i want to know that do
i have one domain link text i want to know that does google crawl
hi i am new iphone programmer i want to know that can we create
I know that to create a file in c++ we use following code #include
I have a function that should create a directory. I want to test to
I want to know that is this possible to create neon affect in android
I want to know that I have the string.xml Resource file which contains status
I know that to create array with integers in Object-c they have to be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.