Hi,

yes that's true. I could do it using the way you described, but in my
case I want to display multiple tooltips at once for printing and that
is only working with the createTooltip method, so I need to use it.

John

Farid SALAH wrote:
> 
> Le 23 oct. 08 à 16:32, John Hauf a écrit :
> 
>> Hi,
>>
>> I have a question about using Tooltips in flex 3.
>>
>> When I have set the tooltip-property of a UIComponent to a string, I can
>> set the porperty ToolTipManager.toolTipClass to any custom class I
>> want to.
>>
>> If I use the ToolTipManager.createToolTip-method to create the Tooltip
>> manually, I don't have the possibility to use a custom class. Setting
>> the toolTipClass has no effect. I checked the
>> mx.managers.ToolTipManagerImpl-class and found out, that in the
>> createToolTip-method always the standard ToolTip-class is used.
>>
>> Is there any other solution to get custom classes working, than patching
>> the ToolTipManagerImpl-class?
>>
>> Thanks
>> John
> 
> 
> I think that if you go as deep as patching the Impl classes of any
> framework, there's something wrong.
> There's a simpler way to do that.
> 
> Your component should do:
> 
> myComponent.addEventListener(ToolTipEvent.TOOL_TIP_CREATE,tooltipDetailCreate);
> 
> myComponent.toolTip = " ";
> 
> then you should do something like...
> 
> private function tooltipDetailCreate(event:ToolTipEvent):void {
>     var tt:PieChartToolTip = new PieChartToolTip();
>     tt.width  = 390;
>     tt.height = 180;
>     tt.dataProvider = // whatever data provider or property you need to
> set for your tooltip component
>     tt.headerText = "My tooltip header"
>     event.toolTip = tt;
> }
> 
> In our case our component is a some king of gauge which shows some
> progression and its tooltip is a PieChart which shows the repartition
> of  the data from the progression.
> 
> That way, whenever a tooltip event is fired it will display your component.
> 
> Good luck,
> 
> Farid from Paris, France
> 
> 

Reply via email to