Thanks a lot... it works perfectly... Akshar Kaul
On Tue, Jun 1, 2010 at 12:32, haripriya ps <[email protected]> wrote: > Hi Akshar, > > Make few changes in the drawtheline component. > > Code : > > > <?xml version="1.0" encoding="utf-8"?> > > <mx:Box > xmlns:mx="http://www.adobe.com/2006/mxml" width="400" > > height=" > 300" creationComplete="createLine()" borderColor="#00FF00" borderStyle=" > solid" mouseMove="findTarget(event)"> > > <mx:Script> > > <![CDATA[ > > *import* mx.core.UIComponent; > > *import* mx.controls.Alert; > > *private* *function* findTarget(event:MouseEvent):*void*{ > > *if* (event.target.name == *"uiTest"*) > > *this*.toolTip=*"this tooltip is coming only for the line"*; > > *else* > > *this*.toolTip = *""*; > > } > > *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); > > g.name = > *"line"*; > > *this*.uiComp.addChild(g); > > } > > ]]> > > </mx:Script> > > <mx:UIComponent id="uiComp" name="uiTest"/> > > </mx:Box> > Noe you can see the tool tip only for the line, not for the component.... > :) > > Thank you > Haripriya > > On Mon, May 31, 2010 at 6:04 PM, Akshar <[email protected]> wrote: > >> 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> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Flex India Community" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<flex_india%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/flex_india?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Flex India Community" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<flex_india%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/flex_india?hl=en. > -- You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.

