Path: utzoo!utgpu!watmath!att!dptg!rutgers!apple!brutus.cs.uiuc.edu!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: chuck@trantor.harris-atd.com (Chuck Musciano) Newsgroups: comp.sys.sun Subject: Re: Canvas popup menus in suntools Keywords: Windows Message-ID: <997@brazos.Rice.edu> Date: 22 Aug 89 11:49:15 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 21 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 101, message 1 of 16 > Now I have scrollbars with the canvas. If > the canvas is unscrolled then menu pops up right where the mouse button is > pressed. But if the canvas has been scolled away from zero position then > the menu pops at weird places, like one corner of the entire screen. When you call menu_show(), it needs the event which initiated the request and the window it occured in. I believe the menu package uses this event to determine where the menu will be displayed, and which button up event signifies a selection in the menu. If you have a scrolling canvas, the event coordinate space has been translated by your scrolling, and this probably confuses the menu package. I believe there is a routine which translates from canvas to world coordinates, which you might want to use to adjust the event location before calling menu_show(). Chuck Musciano ARPA : chuck@trantor.harris-atd.com Harris Corporation Usenet: ...!uunet!x102a!trantor!chuck PO Box 37, MS 3A/1912 AT&T : (407) 727-6131 Melbourne, FL 32902 FAX : (407) 727-{5118,5227,4004} Gee, Beaver, everything's that fun can get you in trouble. Haven't you learned that yet? --Gilbert