Menu positioning

Ingo Hohmann iho at gmx.de
Thu Dec 9 04:51:33 UTC 2004


Hi All,

one thing that has always bugged me is the menu positioning, which is 
always just to the right of the mouse pointer, so you have to move your 
mouse to the right and down, instead of just up and down.

Chasing down the culprit, I found this function:


Menu>>popUpEvent: evt in: aWorld
	"Present this menu in response to the given event."

	| aHand aPosition |
	aHand := evt ifNotNil: [evt hand] ifNil: [ActiveHand].
	aPosition := (aHand position truncated) - (10 at 0).
	Transcript show: aPosition;cr.
	^ self popUpAt: aPosition forHand: aHand in: aWorld


(which at least is used, when opening the world menu, but it seems it 
isn't used for the right click menu).

I added the "- (10 at 0)" part, and after that the menu doesn't open any 
longer.

Any ideas on what is going on? (This is a 3.9 alpha image, by the way).


Thanks,

Ingo





More information about the Squeak-dev mailing list