AddPanelExImagePage

www.progui.co.uk  Top  Previous  Next

AddPanelExImagePage()

Syntax

WindowsID.i = AddPanelExImagePage(Background.i, *BackgroundImg, ImageX.l, ImageY.l, ImageWidth.l, ImageHeight.l, Style.l)

Description

Adds an empty image page to the current PanelEx container.  Any gadgets created after this command will be added to the page.

Background.i can be a gradient or a number from -1 to 11 which selects the style of the theme background for the panel:

Background.l

Theme

-1

No theme background.

0

Default tabbed background.

1

Blue slight vertical gradient.

2

Blue horizontal gradient.

3

Light blue solid.

4

Light blue horizontal gradient.

5

Light blue slight vertical gradient.

6

Dark blue slight vertical gradient.

7

Rebar background.

8

System push button normal background.

9

System push button hot background.

10

System push button pressed background.

11

System push button disabled background.

 

Note the theme descriptions are based on WindowsXP Blue visual Style

and may vary in appearance depending on the user's theme settings.

 

*BackgroundImg points to the image data you want to display.

 

ImageX.l, ImageY.l, ImageWidth.l and ImageHeight.l are the coordinates and dimensions of the image to be displayed on the page.  If ImageWidth.l or ImageHeight.l are zero then they default to the dimensions of the PanelEx.

 

Style.l can be any of the following flags:

Flag

Description

#PNLX_CENTRE

centres the image horizontally on the page bypassing the ImageX.l value.

#PNLX_VCENTRE

centres the image vertically on the page bypassing the ImageY.l value.

#PNLX_RIGHT

aligns the image from the right of the panel.

#PNLX_BOTTOM

aligns the image from the bottom of the panel.

#PNLX_HREPEAT

repeats the image along the horizontal axis bypassing the ImageX.l value.

#PNLX_VREPEAT

repeats the image along the vertical axis bypassing the ImageY.l value.

#PNLX_TILE

tiles the image over the panel bypassing the ImageX.l and ImageY.l values.

#PNLX_STRETCH

stretches the image to fill the panel bypassing the ImageX.l, ImageY.l, ImageWidth.l and ImageHeight.l values. Use sparingly as this style is pretty slow to render.

#PNLX_PERCENT

positions the image as a percentage of the panel size, ImageX.l and ImageY.l must be <= 100.

#PNLX_HPERCENT

positions the image horizontally as a percentage of the panel size, ImageX.l must be <= 100.

#PNLX_VPERCENT

positions the image horizontally as a percentage of the panel size, ImageX.l must be <= 100.

#PNLX_MASKED

displays the image with colour white (#FFFFFF, RGB:255,255,255) as transparent, useful for displaying JPEG files with transparency or other formats that don't have an alpha channel.

#PNLX_NOCLIP

when inside another PanelEx, this flag disables render clipping of the page's contents to the size of this PanelEx bounding rectangle.

#PNLX_TRANSPARENT

if the PanelEx is inside another control this flag will make the page's mouse input "transparent", meaning that the parent control receives all it's messages even when the mouse is over the PanelEx.

#PNLX_NOGADGETLIST

this is a PureBasic only flag and tells the PanelEx not to create a GadgetList for the page.

 

Returns the Windows ID (HWND) of the newly created PanelEx page or zero for failure.

 

PanelEx Index