Message 1 of 9
capture right click in getpoint

Not applicable
11-27-2009
06:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How to detect right click as response to a getxxx call
The various flavors of PromptStatus dont seem to be the trick,
I see the following about mousegesture in msdn but no clue if this is the
way somehow...any tips?
MouseGesture CutCmdMouseGesture = new MouseGesture(
MouseAction.MiddleClick);
MouseBinding CutMouseBinding = new MouseBinding(
ApplicationCommands.Cut,
CutCmdMouseGesture);
// RootWindow is an instance of Window.
RootWindow.InputBindings.Add(CutMouseBinding);
from acads' lab2(modified)[CommandMethod("selectPoint")]static public void
selectpoint() {while (true){PromptPointOptions prPointOptions = new
PromptPointOptions("Select a point");PromptPointResult prPointRes;Editor ed
= Application.DocumentManager.MdiActiveDocument.Editor;prPointRes =
ed.GetPoint(prPointOptions);//i tried .Other but that didn't fire on right
click//i get "Invalid Point" at the command line...so it didn't throw an
error either//if (prPointRes.Status == PromptStatus.Other)
//{//ed.WriteMessage("Other\n");//break;//}if (prPointRes.Status !=
PromptStatus.OK){ed.WriteMessage("Error\n");break;}else{ed.WriteMessage("You
selected point " + prPointRes.Value.ToString());}}}
The various flavors of PromptStatus dont seem to be the trick,
I see the following about mousegesture in msdn but no clue if this is the
way somehow...any tips?
MouseGesture CutCmdMouseGesture = new MouseGesture(
MouseAction.MiddleClick);
MouseBinding CutMouseBinding = new MouseBinding(
ApplicationCommands.Cut,
CutCmdMouseGesture);
// RootWindow is an instance of Window.
RootWindow.InputBindings.Add(CutMouseBinding);
from acads' lab2(modified)[CommandMethod("selectPoint")]static public void
selectpoint() {while (true){PromptPointOptions prPointOptions = new
PromptPointOptions("Select a point");PromptPointResult prPointRes;Editor ed
= Application.DocumentManager.MdiActiveDocument.Editor;prPointRes =
ed.GetPoint(prPointOptions);//i tried .Other but that didn't fire on right
click//i get "Invalid Point" at the command line...so it didn't throw an
error either//if (prPointRes.Status == PromptStatus.Other)
//{//ed.WriteMessage("Other\n");//break;//}if (prPointRes.Status !=
PromptStatus.OK){ed.WriteMessage("Error\n");break;}else{ed.WriteMessage("You
selected point " + prPointRes.Value.ToString());}}}