Select All on viewer

General discussions about GdPicture.NET.
Post Reply
spighy1980
Posts: 5
Joined: Wed Jun 30, 2010 12:13 pm

Select All on viewer

Post by spighy1980 » Wed Jun 30, 2010 12:36 pm

Hi,
I'm working with GdPicture version 6.7.0.0 licensed.
I would like to create a region that contains the entire file displayed on viewer ("select all" functionality). Is it possible?
Is it also possible to change background color of the selected region?

Thanks in advance,

G. S.

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

Re: Select All on viewer

Post by Loïc » Wed Jun 30, 2010 2:18 pm

Hi,
I would like to create a region that contains the entire file displayed on viewer ("select all" functionality). Is it possible?
Easy:

Code: Select all

        regid = GdViewer1.AddRegionInches("MyRegion", 0, 0, GdViewer1.PageWidth / GdViewer1.HorizontalResolution, GdViewer1.PageHeight / GdViewer1.VerticalResolution, ForegroundMixMode.ForegroundMixModeMASKPEN, Color.Aqua)
        GdViewer1.Redraw()
Is it also possible to change background color of the selected region?

Yes:

Code: Select all

        GdViewer1.SetRegionColor(regid, Color.LightSalmon)
        GdViewer1.Redraw()

Hope this helps,

Loïc

spighy1980
Posts: 5
Joined: Wed Jun 30, 2010 12:13 pm

Re: Select All on viewer

Post by spighy1980 » Thu Jul 01, 2010 11:01 am

Loïc wrote:Hi,
I would like to create a region that contains the entire file displayed on viewer ("select all" functionality). Is it possible?
Easy:

Code: Select all

        regid = GdViewer1.AddRegionInches("MyRegion", 0, 0, GdViewer1.PageWidth / GdViewer1.HorizontalResolution, GdViewer1.PageHeight / GdViewer1.VerticalResolution, ForegroundMixMode.ForegroundMixModeMASKPEN, Color.Aqua)
        GdViewer1.Redraw()
Is it also possible to change background color of the selected region?

Yes:

Code: Select all

        GdViewer1.SetRegionColor(regid, Color.LightSalmon)
        GdViewer1.Redraw()

Hope this helps,

Loïc
Hi Loïc,
It's work very well.
Thank's a lot.

G. S.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest