SetPanelExPageBorder

www.progui.co.uk  Top  Previous  Next

SetPanelExPageBorder()

Syntax

Success = SetPanelExPageBorder(Panel.i, Index.i, *BorderImage, *BorderMask, *BorderRect.RECT, *BorderAutoStretch.RECT, noRefresh.b)

Description

 

Sets the border of a previously created PanelEx page.

 

The border is made from a single image containing all the border parts, supporting alpha transparency and optional image mask.

Panel.i is the ID/Handle of the PanelEx and Index.i is the Index/Handle of the page that you want to set the border for.

*BorderImage points to the image data that will be used as the border, for example: -

border

*BorderMask is optional and if null ProGUI will automatically generate a mask based on the *BorderImage. If *BorderMask is -1 then no mask is used/created, *BorderMask can also be set to -2 in order for ProGUI to automatically generate a mask and render the background of the page using just the mask without drawing the border image. If finer control is needed *BorderMask can also point to monochrome image data that will be used as the border's mask, for example: -

border_m

Any pixel that is white (#FFFFFF, RGB:255,255,255) will mask out the background of the PanelEx page where the border overlaps and any pixel that is black (#000000, RGB:0,0,0) will be transparent.

*BorderRect.RECT can be null in order for ProGUI to automatically detect the border or can be a pointer to a RECT structure (Rectangle) that describes what parts of the BorderImage.l will be used as the border. ProGUI calculates what parts are needed by subtracting *BorderRect.RECT from the BorderImage.l bounding rectangle, for example : -

borderExample

*BorderAutoStretch.RECT is optional and can be null. If set then ProGUI will stretch the image for particular border sides instead of repeating the image. *BorderAutoStretch should point to a RECT structure with each side of the rectangle representing whether the 'auto stretch' mode is turned on or not for that particular side of the border (#True / #False).

If noRefresh.b is set to true then the PanelEx page won't be refreshed/updated after this command is called.

 

Returns true for success or zero for failure.

 

PanelEx Index