本文介绍了如何显示禁用控件的工具提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在显示一个按钮列表,其中一些按钮可能会被禁用。我需要在禁用按钮上显示一个工具提示,并解释为什么它被禁用,但似乎我不能禁用该按钮,而不禁用工具提示。有没有一个简单的方法来解决这个问题?
I'm displaying a list of buttons, some of which might be disabled. I need to show a tooltip on the disabled buttons with an explanation of why it's disabled, but it seems I can't disable the button without disabling the tooltip. Is there a simple way around this?
推荐答案将按钮包装到一个组中,并将该工具提示应用于该组。 / p>
Wrap the Button in a Group, and apply the toolTip to the group instead.
<s:Group toolTip="My toolTip"> <s:Button enabled="false"/> </s:Group>这有点难看,但是有效。
It's a bit ugly, but it works.
更多推荐
如何显示禁用控件的工具提示?
发布评论