You would extend the DateField component and override the properties
in the new Class' constructor, for example:
package mycomponents
{
import mx.controls.DateField;
public class MyDateField extends DateField
{
public function MyDateField()
{
super();
monthNames=['Jan', 'Feb', 'Mar', 'Apr', 'May',
'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov',
'Dec'];
}
}
}
Then in your code replace all references to DateField with MyDateField.
--
Josh Vanderberg
vanderberg.typepad.com - Flex blog and open source flex components
--- In [email protected], "cristian.mrsystem"
<[EMAIL PROTECTED]> wrote:
>
> Hi.
>
> I'm using Flex 2.01, and I'm looking for something to change the
values for all the
> components of the same kind, by declaring it only once in the
application. For example:
> I want to use my personal monthNames and dayNames for the component
DateField, but I
> want to declare my values only once, and not every time I add a
DateField component.
>
> I got the idea when I saw that I could define the labels for the OK,
Cancel, Yes and No buttons
> from Alert messages, by changing the value of variables in the main
application like:
> Alert.yesLabel = "Sí";
> Alert.noLabel = "No";
> Alert.cancelLabel = "Cancelar";
> Alert.okLabel = "Aceptar";
>
> Can I do something similar with other components? Where can I find
the info about it?
>
> Thank you very much
>