Adobe Flex: toolTip of a spark component with enabled=false

不羁的心 提交于 2019-12-25 03:14:32

问题


I have a Spark Component (a Group) which doesn't behave as wanted.
The tooltip is only shown when the component is enabled=true which the following example shows:

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx"
               creationComplete="init(event)">
    <s:layout>
        <s:HorizontalLayout />
    </s:layout>

    <s:Group toolTip="test" enabled="false">

    </s:Group>
    <mx:Canvas toolTip="test" enabled="false">

    </mx:Canvas>
</s:Application>

In the Halo component the toolTip is shown. And this is what I want to achieve.

In my case I want to try something like this:

<s:Group toolTip="{cartEntries > 0 ? 'great!' : 'go and buy!'}"></s:Group>

Any hints?


回答1:


Only workaround: create enabled wrapper container with tooltip.



来源:https://stackoverflow.com/questions/3967887/adobe-flex-tooltip-of-a-spark-component-with-enabled-false

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!