MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

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


  • Prev by Date: Grid within Manipulate
  • Next by Date: Re: How can I minimize it?
  • Previous by thread: EventHandler and Mouse Keys
  • Next by thread: Display of Alternatives Symbol in Notebooks in Version 7