This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, November 9, 2012 7:05:21 AM(UTC)
Groups: Registered
Posts: 37
Hi,
I am trying something a little different. I am using a custom form sort as a floating, hideable toolbox that comes up when the user right clicks on the image.
This works fine except when I enter design mode for annotations. I know that the annotaion container takes over the mouse click events, but I was wondering if there
is any way that if a user right clicks anywhere on the image(but not an annotation) that I could route the mouse event to the viewer so it could handle that message.
I am using v17.5 with .net libraries
Thanks
#2
Posted
:
Sunday, November 11, 2012 4:55:04 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
You can do this as follows:
1. Disable the context menu by using the following code:
+-----------+
AnnAutomationManager _annManager;
...
_annManager.ContextMenu = null;
+-----------+
2. Handle the Viewer.MouseDown() event as follows:
+-----------+
private void _viewer_MouseDown(object sender, MouseEventArgs e)
{
if (_viewer.Image != null && e.Button == MouseButtons.Right)
{
//Show the toolbox
}
}
+-----------+
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#3
Posted
:
Monday, November 12, 2012 5:14:28 AM(UTC)
Groups: Registered
Posts: 37
Thanks Maen, I will give this a try.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.