Highlighting area of a page
Posted: 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?
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();