• Flex圆角矩形


    <?xml version="1.0" encoding="utf-8"?>  
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"  
                    layout="vertical"  
                    verticalAlign="middle"  
                    backgroundColor="white">  
      
        <mx:Script>  
            <![CDATA[  
                private function checkBox_change(evt:Event):void {  
                    var corners:Array = [];  
                    if (tLeft.selected) {  
                        corners.push("tl");  
                    }  
                    if (tRight.selected) {  
                        corners.push("tr");  
                    }  
                    if (bLeft.selected) {  
                        corners.push("bl");  
                    }  
                    if (bRight.selected) {  
                        corners.push("br");  
                    }  
                    var str:String = corners.join(" ");  
                    textInput.setStyle("focusRoundedCorners", str);  
                    focusManager.setFocus(textInput);  
                }  
            ]]>  
        </mx:Script>  
      
        <mx:ApplicationControlBar dock="true">  
            <mx:Form styleName="plain">  
                <mx:FormItem label="top left (tl):">  
                    <mx:CheckBox id="tLeft"  
                                 selected="true"  
                                 change="checkBox_change(event);" />  
                </mx:FormItem>  
                <mx:FormItem label="top right (tr):">  
                    <mx:CheckBox id="tRight"  
                                 selected="true"  
                                 change="checkBox_change(event);" />  
                </mx:FormItem>  
                <mx:FormItem label="bottom left (bl):">  
                    <mx:CheckBox id="bLeft"  
                                 selected="true"  
                                 change="checkBox_change(event);" />  
                </mx:FormItem>  
                <mx:FormItem label="top right (br):">  
                    <mx:CheckBox id="bRight"  
                                 selected="true"  
                                 change="checkBox_change(event);" />  
                </mx:FormItem>  
            </mx:Form>  
        </mx:ApplicationControlBar>  
      
        <mx:TextInput id="textInput"  
                      focusThickness="10"  
                      cornerRadius="10" />  
        <mx:Button/>  
      
    </mx:Application>

    <?xml version="1.0" encoding="utf-8"?>  
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"  
            layout="vertical"  
            verticalAlign="middle"  
            backgroundColor="white">  
      
        <mx:TextInput id="textInput"  
                focusThickness="10"  
                cornerRadius="10"  
                focusRoundedCorners="tl br" />  
      
    </mx:Application>  
    <?xml version="1.0" encoding="utf-8"?>  
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"  
            layout="vertical"  
            verticalAlign="middle"  
            backgroundColor="white">  
      
        <mx:Style>  
            TextInput {  
                focusRoundedCorners: "tl br";  
            }  
        </mx:Style>  
      
        <mx:TextInput id="textInput"  
                focusThickness="10"  
                cornerRadius="10" />  
      
    </mx:Application> 
  • 相关阅读:
    简单两步 ~ 绕过 "Paused in debugger"
    Python3 与 C# 并发编程之~ 线程篇
    【翻译】七个习惯提高Python程序的性能
    Jupyter-Notebook 远程访问
    Ubuntu18.04下给Jupyter-NoteBook设置默认工作路径(附Win设置和pip版)
    Python3 与 C# 并发编程之~ 进程篇
    Python3 与 C# 并发编程之~进程先导篇
    交叉编译调试qemu_guest_agent
    OVN简单部署
    OVN学习(三)
  • 原文地址:https://www.cnblogs.com/exmyth/p/3394566.html
Copyright © 2020-2023  润新知