zoukankan      html  css  js  c++  java
  • 在MXML代码中,而不是ActionScript中,实现接口

    Implementing the IToolTip interface

    You can also create a custom ToolTip by extending an existing control, such as a Panel or other container, and implementing the IToolTip interface. The following example uses a Panel container as the base for a new implementation of the IToolTip interface:



     1 <?xml version="1.0"?>
     2 <!-- tooltips/ToolTipComponents/PanelToolTip.mxml -->
     3 <s:Panel 
     4     xmlns:fx="http://ns.adobe.com/mxml/2009"    
     5     xmlns:mx="library://ns.adobe.com/flex/mx"     
     6     xmlns:s="library://ns.adobe.com/flex/spark"
     7     implements="mx.core.IToolTip" 
     8     width="200" 
     9     alpha=".75">
    10     <fx:Script>
    11         <![CDATA[
    12             [Bindable]
    13             public var bodyText:String = "";
    14 
    15             //  Implement required methods of the IToolTip interface; these 
    16             //  methods are not used in this example, though.
    17             public var _text:String;
    18 
    19             public function get text():String { 
    20                 return _text; 
    21             } 
    22             public function set text(value:String):void {
    23             } 
    24         ]]>
    25     </fx:Script>
    26 
    27     <s:RichText text="{bodyText}" percentWidth="100"/>
    28 
    29 </s:Panel>
  • 相关阅读:
    js回车键事件
    legend3---15、像粉丝数、关注数、课程数等数量数据如何处理
    Jquery.Data()和HTML标签的data-*属性
    php判断两个数组是否相等
    安卓Android控件ListView获取item中EditText值
    ubuntu安装和查看已安装
    Remove “System Program Problem Detected” Messages From Ubuntu
    Genymotion
    Genymotion中文手册
    sudo apt-get install lib32stdc++6
  • 原文地址:https://www.cnblogs.com/iihe602/p/2100980.html
Copyright © 2011-2022 走看看