Well, I believe that line "this.setStyle("textAlign","center");" in the MyDataTip class is a bit misleading as it only creates the illusion that the text is being centered, which is true, but only centered relatively to text dimensions, not to the whole rectangle. This is done here in a pretty artificial way using g.drawRect(-50,0,w+100,h); (the "-50" does the trick here).
So my question would be, is there any way to do have the text being centered relatively to the containing rectangle ?
Make sure the text widget covers the whole width of the datatip?
Hello Flex harUI, and thanx a lot for your answer.
But I really don't get the point regarding the text widget. Which text widget? I mean the only thing related to text is "this.setStyle("textAlign", "center");", which probably acts upon that "widget" but I don't see how you can make it "cover the whole width of the datatip"... Thanx for further explanations.