PolygonMorph balloon text
Ned Konz
ned at squeakland.org
Wed Jan 12 18:40:30 UTC 2005
On Tuesday 11 January 2005 8:01 am, Frank Shearar wrote:
> When I hover the mouse within the region though I don't see the balloon
> text. It's only when I hover the mouse over the lines in the polygon (the
> borders of the region, if you like) that I see the balloon text.
>
> Thus my question: How can I have the balloon text show up when the mouse
> hovers anywhere within the bounds of the polygon?
>
> I've tried searching, and got as far as Morph>>handleMouseEnter: which
> calls HandMorph>>triggerBalloonFor:after - I thought perhaps PolygonMorph
> overrode something to make mouse hover balloon texts behave the way they
> do, but I couldn't find anything.
That's because it's transparent. The containsPoint: method is answering false
because of this.
If you make the color something like
Color r: 0 g: 0 b: 0 alpha: 0.004
or override containsPoint: in your own subclass of PolygonMorph (removing the
test for 'color isTransparent'), it should work.
--
Ned Konz
http://bike-nomad.com/squeak/
More information about the Squeak-dev
mailing list
|