Hi All!

Run the application below and click the Switch state button. DateField
icon appears rough. It looks correct only after mouse over.

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
        creationComplete="onCreationComplete()"
        width="100%"
        height="100%">
        
        <mx:Script>
                <![CDATA[
                        import mx.controls.DateField;
                        import mx.controls.Alert;
                        
                        private static const DATE_FIELD_STATE : String = 
"dateFieldState";
                        
                        private function onCreationComplete() : void {
                                myBox.addChild(new DateField());
                        }
                        
                        private function switchCurrentState() : void {
                                currentState = DATE_FIELD_STATE;
                        }
                        
                ]]>
        </mx:Script>
        
        <mx:states>
                <mx:State name="{DATE_FIELD_STATE}">
                        <mx:AddChild relativeTo="{topBox}">
                                <mx:target>
                                        <mx:Box id="myBox" />
                                </mx:target>
                        </mx:AddChild>
                </mx:State>
        </mx:states>
        
        <mx:Box id="topBox" width="100%" height="50%"
horizontalAlign="center" verticalAlign="middle" />
        <mx:Box id="bottomBox" width="100%" height="50%"
horizontalAlign="center" verticalAlign="middle">
                <mx:Button label="Switch state" click="switchCurrentState()" />
        </mx:Box>

</mx:Application>

Sergey.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to