开发者

How to skin an mx:DateChooser in Flex 4

I found these properties:

selectionIndicatorSkin="..."
todayIndicatorSkin="..."

Which skins the DateChooser Selected and todays item.

Oddly 开发者_运维百科enough I didn't find a way where I can specifiy the skin for regular days! I found this property:

weekDayStyleName="..."

so I created a style

.myStyle{
    skin-class: ClassReference("com.mySkin");
}

then used it: weekDayStyleName="myStyle" But it didn't work! Any ideas?

Extra Code:

<mx:DateChooser id="date1" 
                todayStyleName="myTodayStyle"
                headerStyleName="myHeaderStyle"
                selectionIndicatorSkin="com.skins.calendar.SelectionIndicatorSkin"
                todayIndicatorSkin="com.skins.calendar.TodayIndicatorSkin1"
                focusSkin="com.skins.calendar.TodayIndicatorSkin1"
                rollOverIndicatorSkin="com.skins.calendar.SelectionIndicatorSkin"
                weekDayStyleName="weekdayStyle"
                borderColor="#FFFFFF"
                todayColor="#FFFFFF"
                width="275" height="275" />

<fx:Style >
    @namespace s "library://ns.adobe.com/flex/spark";
    @namespace mx "library://ns.adobe.com/flex/mx";
    @namespace vld "com.lal.validators.*";
    @namespace effect "com.lal.effects.*";
    @namespace components "com.lal.components.*";



    .weekdayStyle{
        skin-class: ClassReference("com.lal.skins.calendar.TodayIndicatorSkin1");
        vertical-align: middle;
        font-size: 18;
    }
</fx:Style> 


I'm pretty sure that all the days in a DateChooser class are UITextFields.

UITextFields do not have a style named skin-class. Check out all styles for the UITextField class.

As such, your style is probably ignored.

Many Flex 4 Spark components have a style named skinClass which you use to set the skin class of the component, but I didn't think such a thing existed for MX Components.

You should be able to customize the look and feel of days by creating your own custom class that implements the IUITextField and then set that as a style with the textFieldClass style.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜