Re: EventHandler and Mouse Keys
- To: mathgroup at smc.vnet.net
- Subject: [mg94735] Re: EventHandler and Mouse Keys
- From: m.r at inbox.ru
- Date: Mon, 22 Dec 2008 05:16:18 -0500 (EST)
- References: <giikf1$9pn$1@smc.vnet.net>
David Park wrote: > Here is an example adapted from the Help for EventHandler. > > > > DynamicModule[ > > {col = Green}, > > EventHandler[ > > Style["text", FontColor -> Dynamic[col]], > > {{"MouseClicked", 1} :> (col = Red), > > {"MouseClicked", 2} :> (col = Green)}] > > ] > > > > This works except that when the right hand key on the mouse is clicked a > context menu is also displayed. Is it possible to suppress the display of > the context menu? > > > > > > David Park > > djmpark at comcast.net > > <http://home.comcast.net/~djmpark> http://home.comcast.net/~djmpark/ This is a bit of a hack, but at least on Windows intercepting the "MouseUp" event blocks the context menu, so just adding {"MouseUp", 2} :> Null to your code will do what you want. Maxim Rytin m.r at inbox.ru