[英]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. 我试图动态设置边界,因为这是UITextFiled,这是不可能的。
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... 最初我以为问题是由于边界重叠而引起的...后来我突然意识到粗体边界的数量不是固定的,它们在不同的机器上是不同的... Babun的(我的朋友...多亏了他)观察也是相同...
Its basically rendering issue of DateChooser... the border width automatically adjusted according to height and width.... 它基本上是DateChooser的渲染问题。边框宽度会根据高度和宽度自动调整。
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 @Flextras感谢您的陪伴
Keep playing -S 继续玩-S
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.