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>
Flex圆角矩形的更多相关文章
- [BOT] 一种android中实现“圆角矩形”的方法
内容简介 文章介绍ImageView(方法也可以应用到其它View)圆角矩形(包括圆形)的一种实现方式,四个角可以分别指定为圆角.思路是利用"Xfermode + Path"来进行 ...
- 用贝赛尔曲线把图片, 按钮, label 绘成圆 或圆角矩形
//创建圆形遮罩,把用户头像变成圆形 /* *CGPointMake(35, 35) 是绘图的中心点, 如果想把控件居中绘圆, 一般用控件的中心点, radius 是圆半径 startAn ...
- RoundedImageView,实现圆形、圆角矩形的注意事项
RoundedImageView是gitHub上面的一个开源组件(https://github.com/vinc3m1/RoundedImageView),实现一些圆形或者圆角矩形是很方便的, < ...
- swift UIImage加载远程图片和圆角矩形
UIImage这个对象是swift中的图像类,可以使用UIImageView加载显示到View上. 以下是UIImage的构造函数: init(named name: String!) -> U ...
- iOS设置圆角矩形和阴影效果
1.设置圆角矩形 //设置dropview属性 _dropView.backgroundColor=[[UIColor whiteColor] colorWithAlphaComponent:0.8] ...
- 如何在html中做圆角矩形和 只有右边的"分隔线"
这个网站满好的,可以常看看 css-matic中有几个很好的写css可视化的工具 其实做css 版式布局等都可以有工具的 推荐40个优秀的免费CSS工具 debugger正则表达式在线 其实是对(理论 ...
- Android中实现圆角矩形及半透明效果。
注:本文由Colin撰写,版权所有!转载请注明原文地址,谢谢合作! 在做Android开发时,我们为了美观,有时候需要使用圆角矩形,或半透明之类的效果,在网页设计中很容易实现.但在Android开发中 ...
- Android圆角矩形创建工具RoundRect类
用于把普通图片转换为圆角图像的工具类RoundRect类(复制即可使用): import android.content.Context; import android.graphics.Bitmap ...
- 解读Unity中的CG编写Shader系列四(unity中的圆角矩形shader)
转自 http://www.itnose.net/detail/6097625.html 上篇文章中我们掌握了表面剔除和剪裁模式 这篇文章将利用这些知识实现一个简单的,但是又很常用的例子:把一张图片做 ...
随机推荐
- RequireJS入门(三)转
这篇来写一个具有依赖的事件模块event.event提供三个方法bind.unbind.trigger来管理DOM元素事件. event依赖于cache模块,cache模块类似于jQuery的$.da ...
- ASP.NET MVC之文件上传【一】
前言 这一节我们来讲讲在MVC中如何进行文件的上传,我们逐步深入,一起来看看. Upload File(一) 我们在默认创建的项目中的Home控制器下添加如下: public ActionResult ...
- C# 对Excel文档打印时的页面设置
1.对打印页面的朝向,页宽,页高进行设置 参考源码[1] using Excel = Microsoft.Office.Interop.Excel; Excel.Application tmpExce ...
- table应用之colspan与rowspan
<table border=" borderColorDark="#66ff33"> <tr> <td rowspan=" ali ...
- 【转】linux之mkfs/mke2fs格式化
转自:http://blog.csdn.net/andyhooo/article/details/5321584 mkfs [root@www ~]# mkfs [-t 檔案系統格式] 裝置檔名 選項 ...
- 创建优雅表格的8个js工具
当需要呈现数百个表的数据时,展示和可访问性扮演着至关重要的角色.在这种情况下,倘若一个数据网格能够支持大量数据集的HTML Table并提供诸如排序.搜索.过滤和分页等功能,那是棒棒哒.在这篇文章中, ...
- c++中实现委托
成员函数指针与高性能的C++委托(上篇) 撰文:Don Clugston 引子 标准C++中没有真正的面向对象的函数指针.这一点对C++来说是不幸的,因为面向对象的指针(也叫做"闭包(clo ...
- 【LeetCode】101 - Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For e ...
- md5加密算法c语言版
from: http://blog.sina.com.cn/s/blog_693de6100101kcu6.html 注:以下是md5加密算法c语言版(16/32位) ---------------- ...
- Apriori算法例子
1 Apriori介绍 Apriori算法使用频繁项集的先验知识,使用一种称作逐层搜索的迭代方法,k项集用于探索(k+1)项集.首先,通过扫描事务(交易)记录,找出所有的频繁1项集,该集合记做L1,然 ...