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>
  • 相关阅读:
    Beta 冲刺(7/7)
    Beta 冲刺(6/7)
    Beta 冲刺(5/7)
    Beta 冲刺(4/7)
    Beta 冲刺(3/7)
    Beta 冲刺(2/7)
    Beta 冲刺(1/7)
    福大软工 · 第十次作业
    Adobe acrobat DC 2020 激活方法
    物理八年级下册2
  • 原文地址:https://www.cnblogs.com/iihe602/p/2100980.html
Copyright © 2011-2022 走看看