Positioning a C# panel just bellow an annotation

Example requests & Code samples for GdPicture Toolkits.
Post Reply
reisrf
Posts: 27
Joined: Thu May 28, 2015 4:30 pm

Positioning a C# panel just bellow an annotation

Post by reisrf » Thu Jun 11, 2015 9:09 pm

I have a windows form with a gdviewer. On this gdViewr I am loading a PDF and the user can add annotations.
When the user select one annotation, I would like to position a C# panel just below the annotation selected.

The problem is, I have the annotation rectangle info (left, top, width, right), but they are related to the image and are in inches.

How to get the windows form coordinates related to the annotation?

Thanks

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Positioning a C# panel just bellow an annotation

Post by Loïc » Fri Jun 12, 2015 10:34 am

Hello,

Just translate the coordinates by using the CoordDocumentInchToViewerPixel() method of the GdViewer control.

Kind regards,

Loïc

reisrf
Posts: 27
Joined: Thu May 28, 2015 4:30 pm

Re: Positioning a C# panel just bellow an annotation

Post by reisrf » Fri Jun 12, 2015 2:29 pm

Many thanks. Worked great!

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Positioning a C# panel just bellow an annotation

Post by Loïc » Fri Jun 12, 2015 2:39 pm

You're very welcome! Thank you for the return.

Cheers,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest