views:

376

answers:

1

Hi

I have a tooltip for each datagrid row. Which is fine. I also can style it with with mx:Style which is great.

However, I desire to have multiple styles ie a header and the rest of the text in the tooltip. Is this possible? Or to have htmlText for input?

+1  A: 

If you need that you should create your own component implementing mx.core.IToolTip and use it to display the tooltip. Write you own handler for toolTipCreate and in this handler set your own component as the tooltip renderer.

        private function createTooltip(e:ToolTipEvent):void {
            //CustomToolTip should extend the Canvas and implement IToolTip 
            var tooltip:CustomToolTip = new CustomToolTip();
            //you need to set the tooltip property in order to make your component used for tooltip renderer
            e.toolTip = tooltip;
        }

        <mx:DataGrid id="myDataGrid" toolTip=" "  toolTipCreate="createToolTip(event)">
Cornel Creanga
I thought it will come to that, asked anyway. Guess i hoped htmlText would be possible.
Smalcat