Thanks for the reply but it doesn’t look that easy. First of all I’m not able to move the input field even if I hardcoded a numeric value, second when the componet get focus you see the focus highlight with the same shape of the original NumericStepper.

This is the code that I’m using:

 

class HorizontalNumericStepper extends mx.controls.NumericStepper

{

            public function HorizontalNumericStepper()

            {

            }

            //

            function layoutChildren():Void

            {

                        var w = nextButton_mc.preferredWidth;

                        var h = prevButton_mc.preferredHeight;

                        var h2 = nextButton_mc.preferredHeight;

                       

                        nextButton_mc._x = 0;

                        nextButton_mc._y = 0;

                        nextButton_mc.setSize(w, h2);

                        prevButton_mc._x = layoutWidth - w;

                        prevButton_mc._y = layoutHeight - h;

                        prevButton_mc.setSize(w, h);

                       

                        inputField.setSize(layoutWidth - w + 1, layoutHeight);

                        StepTrack_mc._width = w;

                        StepTrack_mc._x = 18; // this doesn't do anything

                        StepTrack_mc._height = layoutHeight - (h2 + h);

                        StepTrack_mc._y = h;

                       

            }

}

 

 


Da: [email protected] [mailto:[EMAIL PROTECTED] Per conto di JesterXL
Inviato: sabato 4 giugno 2005 19.41
A: [email protected]
Oggetto: Re: [flexcoders] horizontal numeric stepper

 

Override NumericStepper's layoutChildren method.

Currently, it's:

function layoutChildren():Void
{
  var w = nextButton_mc.preferredWidth;
  var h = prevButton_mc.preferredHeight;
  var h2 = nextButton_mc.preferredHeight;
 
  nextButton_mc._x = layoutWidth - w;
  nextButton_mc._y = 0;
   nextButton_mc.setSize(w, h2);
  prevButton_mc._x = layoutWidth - w;
  prevButton_mc._y = layoutHeight - h;
   prevButton_mc.setSize(w, h);

  inputField.setSize(layoutWidth - w + 1, layoutHeight);
  StepTrack_mc._width = w;
  StepTrack_mc._x = layoutWidth - StepTrack_mc._width;
  StepTrack_mc._height = layoutHeight - (h2 + h);
  StepTrack_mc._y = h;
}

simply override, and modify the positoin of next and prev button.

----- Original Message -----
From: "Paolo Bernardini" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, June 04, 2005 9:39 AM
Subject: [flexcoders] horizontal numeric stepper


Any idea how to implement an horizontal numeric stepper with left and
right arrows instead of up and down ones. like this: < 10 >





Yahoo! Groups Links















Passa a QUIZIL SuperMail !

Con 40 MBytes di spazio per casella (a richiesta anche 100), spedizione ad alta velocit� di messaggi grandi fino a 20 Mbytes,
WebMail di alta qualit�, la configurazione gratuita di SPF e, naturalmente, Antivirus, Antispam, POP e IMAP, pi� il backup settimanale.
SuperMail � integrabile con WebFax e WebAdmin.
Se preferisci l'indipendenza puoi portare un MailGateway entro la tua azienda, ed usarlo per attivare le funzioni cooperative di Outlook !

Attiva QUIZIL SuperMail con una email a [EMAIL PROTECTED]







Yahoo! Groups Links

Reply via email to