# IupBackgroundBox

Definition: | include pGUI.e Ihandle ih = IupBackgroundBox(Ihandln child=NULL, string attributes="", dword_seq args={})
Description: | Creates a simple native container with no decorations. Useful for controlling children visibility for IupZbox or IupExpander. It inherits from IupCanvas. child: Identifier of an interface element which will receive the box, can be NULL. For more information on the attributes and args parameters see IupSetAttributes. Returns: the identifier of the created element.
Notes: | The box can be created with no elements and filled dynamically using IupAppend() or IupInsert(). The ACTION callback can be defined and the application can draw below other children inside the BackgroundBox, but only with the IupDraw API. To avoid overlapping the drawing areas it is recommended that children must be inside native containers. Inherits all attributes and callbacks of the IupCanvas, but redefines a few attributes. The IupGLBackgroundBox() is identical, but with OpenGL enabled. (However I cannot be sure whether BACKIMAGE, BACKIMAGEZOOM, BACKCOLOR, and THEME were deliberate omissions from the offical IupGLBackgroundBox docs.)
pwa/p2js: | Not supported. (Just not stumbled into a need for it as yet, probably would not be all that technically difficult.)
Attributes: |
BACKIMAGE | (non inheritable): image name to be used as background. Use IupSetHandle or IupSetAttributeHandle to associate an image to a name. See also IupImage. When defined the ACTION callback of the IupCanvas will be defined. (since 3.26)
BACKIMAGEZOOM | (non inheritable): if set the back image will be zoomed to occupy the full background. Aspect ratio is NOT preserved. Can be Yes or No. Default: No. (since 3.26)
BACKCOLOR | (non inheritable): if defined used to fill the background color when BACKIMAGE is defined. If not defined BGCOLOR is used. (since 3.26)
BGCOLOR | by default will use the background color of the native parent, but can be set to a custom value.
BORDER | (creation only): the default value is "NO".
CANVASBOX | (non inheritable): enable the behavior of a canvas box instead of a regular container. This will affect the EXPAND attribute, the Natural size computation, and children layout distribution. Can be Yes or No. Default: No. (since 3.19)
CHILDOFFSET | (non inheritable): Allows the position offset for the child to be specified. Available for native containers only. It will not affect the natural size, and allows to position controls outside the client area. Format "dxxdy", where dx and dy are integer values corresponding to the horizontal and vertical offsets, respectively, in pixels. Default: 0x0.
DECORATION | (non inheritable): Enable a decoration area around the child. Can be Yes or No. Default No. (since 3.20)
DECORSIZE | (non inheritable): total size of the decoration in the format "WidthxHeight". Used only when DECORATION=Yes. (since 3.20)
DECOROFFSET | (non inheritable): decoration offset from left border and top border in the format "%dx%d". Used only when DECORATION=Yes. (since 3.20)
EXPAND | (non inheritable): behaves as a container. See CANVASBOX attribute.
CANFOCUS | (non inheritable): the default is changed to NO. But it can receive the focus (since 3.19).
also | CLIENTSIZE, CLIENTOFFSET, THEME: also accepted.