加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Flex 资料备份

发布时间:2020-12-15 01:30:38 所属栏目:百科 来源:网络整理
导读:1、flex4 不能输入中文的解决方法 ??? s:ComboBox focusIn="{IME.enabled=true}" 2、flex4 label 换行 ?? lineHeight="20" lineBreak="toFit" maxDisplayedLines="-1" 3、个性化的tooltip ?? ToolTipComponent.mxml ?xml version="1.0" encoding="utf-8"? s:

1、flex4 不能输入中文的解决方法

??? <s:ComboBox focusIn="{IME.enabled=true}">

2、flex4 label 换行
?? lineHeight="20" lineBreak="toFit" maxDisplayedLines="-1"

3、个性化的tooltip

??

ToolTipComponent.mxml

<?xml version="1.0" encoding="utf-8"?>
<s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
???? xmlns:s="library://ns.adobe.com/flex/spark"
???? implements="mx.core.IToolTip"
???? xmlns:mx="library://ns.adobe.com/flex/mx"
???? alpha=".8" cornerRadius="7" borderVisible="false" width="200" height="200">
?<fx:Script>
??<![CDATA[
???import mx.core.IToolTip;
???[Bindable]public var str:String="";
???[Bindable]public var str1:String="";
???[Bindable]public var _text:String;
???public function get text():String {
????return _text;
???}
???public function set text(value:String):void {
???}
??]]>
?</fx:Script>
?<fx:Declarations>
??<!-- 将非可视元素(例如服务、值对象)放在此处 -->
?</fx:Declarations>
?<mx:Image source="{str1}" width="100%" height="100%"/>
</s:BorderContainer>

?

使用方法

?

?

public var tip:ToolTipComponent = new ToolTipComponent();

public function createToolTips(event:ToolTipEvent,imageUrl:String):void {
tip.str1 = imageUrl;
event.toolTip = tip;
}

public function showToolTips(evt:ToolTipEvent,mx:Number,my:Number):void{
}


<mx:Image width="50" height="60" source="{data.@image}" toolTip="00000"
?toolTipCreate="outerDocument.createToolTips(event,data.@image);"?toolTipShow="outerDocument.showToolTips(event,this.width,y);"/>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读