简体   繁体   中英

Flex mx:DateChooser bold cell border issue

在此处输入图片说明

    <mx:Script>
        <![CDATA[
            import mx.core.UITextField;

            private function setDayStyles():void{
                var dateField  :UITextField;
                var colIndex : int;
                var rowIndex : int;
                dateChooser.mx_internal::dateGrid.height = 148;
                dateChooser.mx_internal::dateGrid.width = 176;

                //Change background for weekday name row
                for(colIndex = 0; colIndex < 7; colIndex++){
                    dateField = dateChooser.mx_internal::dateGrid.mx_internal::dayBlocksArray[colIndex][0] as UITextField;
                    dateField.background = true;
                    dateField.border = true;
                    dateField.backgroundColor = 0xCCCCCC;
                    dateField.borderColor = 0xCCCCCC;

                } 
                //set border for day labels
                for(rowIndex = 1; rowIndex < 7; rowIndex++){
                    for(colIndex = 0;  colIndex < 7; colIndex++){
                        dateField = dateChooser.mx_internal::dateGrid.mx_internal::dayBlocksArray[colIndex][rowIndex] as UITextField;
                        dateField.border = true;
                        dateField.borderColor = 0xCCCCCC;
                    }
                } 
            }

        ]]>
    </mx:Script>

    <mx:HBox  horizontalGap="15" styleName="padding10Style">
        <mx:DateChooser id="dateChooser" initialize="setDayStyles()"/>
    </mx:HBox>

</mx:Application>

I am facing the of bold border problem. Below is the code snipet for your reference:

I have tried to set the bordersides dynamically as this is UITextFiled , this is not possible.

Finally got the solution... huh!!!
Actually the behavior is wired... :(
Initially I thought the problem is because of overlapping of border... then I suddenly realize the number of bold borders are not fixed they are different on different machine... Babun's (my friend... thanks to him)observation is also the same...
Its basically rendering issue of DateChooser... the border width automatically adjusted according to height and width....
Played with width and height and got the expected result. Modified width and height is:

dateChooser.mx_internal::dateGrid.height = 147;
dateChooser.mx_internal::dateGrid.width = 175;

大胆的边界不再

Pain is over :)

@Flextras thanks for your time man

Keep playing -S

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM