Highlighting area of a page

Discussions about document viewing.
Post Reply
mchernecki
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.RemoveAllRegions();
gdViewer1.AddRegion("Data", 100, 300 + (397 * 0), 2200, 200, ForegroundMixMode.ForegroundMixModeUNDEFINED, Color.Blue);
gdViewer1.SetRegionBorderWidth(1, 3);
gdViewer1.SetRegionColor(1, Color.Red);
gdViewer1.Redraw();

Gabriela
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

Hi,

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

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest