Highlighting area of a page

Discussions about document viewing.
Post Reply
Posts: 3
Joined: Fri Apr 08, 2011 9:44 pm

Highlighting area of a page

Post by mchernecki » Tue Nov 06, 2012 11:59 pm

I have GDPicture .NET ver 7. Iam developing an app where on the left I have textboxes for the user to input data and the right is a GDViewer object to display the page. I would like to display a rectangle around an area of the page, highlighting the data corresponding to the textbox. As the user tabs through the textbox fields, I would like to move this rectangle around the page to highlight the data.

I have tried this using regions, but I found it to be unreliable and slow. Perhaps I am not calling the api in the proper order. I have the following code on the the enter event for each textbox, changing the region coordinates for each field. The first field that loads is highlighted with a black border rectangle with red text, each occurance after has no bounding rectangle and text is blue.

Should I be doing this a different way and do you have an example?

Code: Select all

gdViewer1.AddRegion("Data", 100, 300 + (397 * 0), 2200, 200, ForegroundMixMode.ForegroundMixModeUNDEFINED, Color.Blue);
gdViewer1.SetRegionBorderWidth(1, 3);
gdViewer1.SetRegionColor(1, Color.Red);

Posts: 436
Joined: Wed Nov 22, 2017 9:52 am

Re: Highlighting area of a page

Post by Gabriela » Thu Jan 31, 2019 3:33 pm


The SetRegionBorderWidth() method sets the property to the region with the specified RegionID:
http://guides.gdpicture.com/content/web ... Width.html
Perhaps you can use the Rectangle of Selection in your scenario:
http://guides.gdpicture.com/content/web ... ument.html
Kind regards,

GdPicture Team

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests