View Full Version : persistent ToolTip (one that remains On even with the Mouse Out)
preslavrachev
04-23-2009, 07:53 PM
Hi all,
I am trying to make a custom ToolTip that will resemble a call out. When you hover a formItem, a panel with some buttons will popup alongside. I've done anything else except making the custom ToolTip stay visible even when the mouse is out.
Any suggestions?
Thanks.
Peter Cowling
04-23-2009, 08:27 PM
Well if the expected user behviour is to click a tooltip in order to close it, you are probably looking at a popup. It is possible to do what you want with tooltip. So, I think the question is, what does the user need to do?
chadzilla
04-23-2009, 09:05 PM
something like this???
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
private function poppan():void
{
pop_up_pan.visible = true;
pop_up_pan.x = contentMouseX;
pop_up_pan.y = contentMouseY;
}
private function populate():void
{
fname.text = "Chad";
lname.text = "Zilla";
pop_up_pan.visible = false;
}
]]>
</mx:Script>
<mx:Panel width="292" height="139" layout="absolute" x="160" y="133">
<mx:Label x="10" y="10" text="First Name:"/>
<mx:TextInput x="87" y="8" id="fname" click="poppan();"/>
<mx:Label x="10" y="40" text="Last Name:"/>
<mx:TextInput x="87" y="38" id="lname"/>
</mx:Panel>
<mx:Panel id="pop_up_pan" x="574" y="273" width="249" height="188" visible="false" layout="absolute">
<mx:Button x="74.5" y="25" label="Chad Zilla" click="populate();"/>
</mx:Panel>
</mx:Application>
chadzilla
04-23-2009, 09:15 PM
or maybe like this???
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
private function poppan():void
{
pop_up_pan.visible = true;
pop_up_pan.x = contentMouseX;
pop_up_pan.y = contentMouseY;
}
private function populate():void
{
pop_up_pan.visible = false;
}
]]>
</mx:Script>
<mx:Panel width="292" height="139" layout="absolute" x="160" y="133">
<mx:Label x="10" y="10" text="Here is some random text"/>
<mx:Label x="10" y="27" text="Here is some more random text with a "/>
<mx:Label x="10" y="45" text="chicken." mouseOver="poppan();" textDecoration="underline" color="#0C00FF"/>
</mx:Panel>
<mx:Canvas id="pop_up_pan" x="574" y="273" width="249" height="147" visible="false" backgroundColor="#00E4FF">
<mx:Button x="74.5" y="25" label="View Chicken" click="populate();"/>
<mx:Button x="74" y="65" label="Hear Chicken" click="populate();" width="100.5"/>
<mx:Button x="74" y="104" label="Eat Chicken" click="populate();" width="100.5"/>
</mx:Canvas>
</mx:Application>
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.