[Q] Making a button immune to mouse clicks
ned at bike-nomad.com
Sun Apr 14 20:22:19 UTC 2002
On Sunday 14 April 2002 11:22 am, Martin Drautzburg wrote:
> If an area is covered by a morph and a sumborph which one will
> receive the mouse events ?
Safer than playing with mouseDownPriority (which I found to be very
tricky) is to just lock the submorphs and then you'll get the events
in the parent. You can then explicitly call the submorphs mouseDown:
for extra credit: study this message trace to understand what happens
when you click on a Morph:
m _ Morph new.
sm _ Morph new extent: 20 at 20; color: Color red.
sm center: m center.
m addMorph: sm.
evt _ MouseButtonEvent new
position: sm center
stamp: Time millisecondClockValue.
MessageTally tallySends: [ ActiveHand handleEvent: evt ].
GPG key ID: BEEA7EFE
More information about the Squeak-dev