i have a line in my application. i require that a tooltip should come
only on the line. The line is in a custom component. when i add the
tooltip to the component it shows the tooltip for whole of the
component. is there a way to show the tooltip only for the line.
here is a sample which i am trying :-

main application file:-

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute" width="100%" height="100%" xmlns:local="*">
            <local:drawtheline/>
</mx:Application>

drawtheline component :-

<?xml version="1.0" encoding="utf-8"?>
<mx:Box xmlns:mx="http://www.adobe.com/2006/mxml"; width="400"
height="300" creationComplete="createLine()" toolTip="this tooltip
should come only on the line"
        borderColor="#00FF00" borderStyle="solid">
        <mx:Script>
                <![CDATA[
                        import mx.core.UIComponent;
                        private function createLine():void
                        {
                                var g:Shape = new Shape();
                                g.graphics.lineStyle(2, 0xFF0000, .75);
                                g.graphics.moveTo(0,0);
                                g.graphics.lineTo(400,300);
                                this.rawChildren.addChild(g);
                        }
                ]]>
        </mx:Script>
</mx:Box> 

Reply via email to