我有一个组合框上的工具提示,但我更喜欢errorTip (带有“尾巴”)的样式。Flex组合框上的错误提示
我用一个errorTip替换了工具提示,但是现在ComboBox有一个红色的 边框。
我仍然是一个新手...有没有办法覆盖 组合框上的红色边框,以便其边框回到良好的黑色?
感谢,
马克
我有一个组合框上的工具提示,但我更喜欢errorTip (带有“尾巴”)的样式。Flex组合框上的错误提示
我用一个errorTip替换了工具提示,但是现在ComboBox有一个红色的 边框。
我仍然是一个新手...有没有办法覆盖 组合框上的红色边框,以便其边框回到良好的黑色?
感谢,
马克
这件事情我已经在过去使用:
动作脚本:
private var infoToolTip:ToolTip;
private function showToolTip(evt:MouseEvent, text:String):void
{
var pt:Point = new Point(evt.currentTarget.x, evt.currentTarget.y);
// Convert the targets 'local' coordinates to 'global' -- this fixes the
// tooltips positioning within containers.
pt = evt.currentTarget.parent.contentToGlobal(pt);
infoToolTip = ToolTipManager.createToolTip(text, pt.x, pt.y, "errorTipAbove") as ToolTip;
infoToolTip.setStyle("borderColor", "#87B846");
infoToolTip.setStyle("color", "white");
var yOffset:int = infoToolTip.height + 5;
infoToolTip.y -= yOffset;
infoToolTip.x -= 5
}
// Remove the tooltip
private function killToolTip():void
{
ToolTipManager.destroyToolTip(infoToolTip);
}
使用工具提示:
<mx:Image source="{myImageSource}" mouseOver="showToolTip(event, 'Hello there!')" mouseOut="killToolTip()" />
共享一些代码,这是Flex 3的或4? – 2011-05-10 15:36:12
你有没有机会尝试我发布的答案?如果它有助于解决您的问题,您可以通过单击^箭头来对其进行调整,并且可以通过单击我答案旁边的复选标记图标将其标记为接受的答案。 – 2011-06-01 20:03:18