I've made custom annotation class which overrides LinesAnnotation.
After drawing that annotation(customed) on annotationviewer, it selected automatically.
I want to select custom annotation manually, but not select automatically after drawing.
Can I do that with OnFinishBuilding(System.Drawing.PointF point)? Or anotherway?
class MyLineAnnotation : LinesAnnotation
{
protected override void OnBuilding(MouseEventArgs e, MouseActions action)
{
... ...
}
protected override void OnFinishBuilding(System.Drawing.PointF point)
{
base.OnFinishBuilding(point);
// how can I reach the goal...
}
}
Best Regards,
Jun Hee.
CustomAnnotation - don't want to select annot. after draw
Moderator: Alex
-
- Posts: 8
- Joined: Wed Jan 18, 2012 10:22 am
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: CustomAnnotation - don't want to select annot. after dra
Hello Jun,
You can set the selected annotation in the annotation viewer using the SelectedAnnotation property of the AnnotationViewer.
Best regards, Alexander
You can set the selected annotation in the annotation viewer using the SelectedAnnotation property of the AnnotationViewer.
Best regards, Alexander
-
- Posts: 8
- Joined: Wed Jan 18, 2012 10:22 am
Re: CustomAnnotation - don't want to select annot. after dra
I handled this issue with codes below,
[DllImport("user32.dll")]
public static extern void mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtaInfo);
and I generated 'mouse_event(0x8 | 0x10, 0, 0, 0, 0);' after draw.
Best regards,
Jun Hee.
[DllImport("user32.dll")]
public static extern void mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtaInfo);
and I generated 'mouse_event(0x8 | 0x10, 0, 0, 0, 0);' after draw.
Best regards,
Jun Hee.
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: CustomAnnotation - don't want to select annot. after dra
Hello Jun,
It is the possible solution but not the best.
Why have you not used the SelectedAnnotation property?
Best regards, Alexander
It is the possible solution but not the best.
Why have you not used the SelectedAnnotation property?
Best regards, Alexander