IupNormalizer

Definition: include pGUI.e

Ihandle ih = IupNormalizer(Ihandles ih_list, string attributes="", sequence data={})
Description: Creates a void (non-visible) container that acts by normalizing all controls in a list so their natural size is the biggest natural size among them.
All natural width will be set to the biggest width, and all natural height will be set to the biggest height according to the NORMALIZE attribute.
The controls of the list must be inside a valid container in the dialog.

ih_list: List of the identifiers that will be normalized. It can be empty.
For more information on the attributes and data parameters see IupSetAttributes.

Returns the identifier of the created element.
Notes: It is NOT necessary to add the normalizer to a dialog hierarchy.
Every time the NORMALIZE attribute is set, a normalization occurs.
If the normalizer is added to a dialog hierarchy, then whenever the Natural size is calculated a normalization occurs,
so add it to the hierarchy before the elements you want to normalize or its normalization will be not used.

The elements do NOT need to be children of the same parent, do NOT need to be mapped, and do NOT need to be in a complete hierarchy of a dialog.

The elements are NOT children of the normalizer, so IupAppend, IupInsert and IupDetach can not be used.
To remove or add other elements, the normalizer must be destroyed and created a new one.

Notice that the NORMALIZERGROUP attribute can simplify a lot the process of creating a normalizer, so you do not need to list several elements from different parts of the dialog.

Has the same effect of the NORMALIZESIZE attribute of the IupVbox and IupHbox controls, but can be used for elements with different parents.

IupNormaliser (with an 's') is a simple alias of IupNormalizer and behaves identically.
Attributes:
NORMALIZE (non inheritable) normalization direction. Can be HORIZONTAL, VERTICAL or BOTH. These are the same values of the NORMALIZESIZE attribute. Default: HORIZONTAL.
ADDCONTROL (non inheritable) Adds a control to the normalizer. The value passed must be the name of an element.
Use IupSetHandle or IupSetAttributeHandle to associate an element to a name.
ADDCONTROL_HANDLE (non inheritable) Adds a control to the normalizer. The value passed must be a handle of an element.
NORMALIZERGROUP (non inheritable, at controls only) name of a normalizer element to automatically add the control.
If an element with that name does not exists then one is created.
Example: Here IupNormalizer is used to normalize the horizontal size of several labels that are in different containers.
Since it needs to be done once only, the IupNormalizer is destroyed immediately after it is created.
IupDestroy(IupNormalizer({IupGetChild(hsi_vb, 0),  -- Hue Label
                          IupGetChild(hsi_vb, 1),  -- Saturation Label
                          IupGetChild(hsi_vb, 2),  -- Intensity Label
                          IupGetChild(clr_vb, 0),  -- Opacity Label
                          IupGetChild(clr_vb, 1)}, -- Hex Label
                         "NORMALIZE=HORIZONTAL"))

The following case uses the internal normalizer in an IupHbox:
button_box = IupHbox({IupFill(),
                      button_ok,
                      button_cancel,
                      button_help},
                     "NORMALIZESIZE=HORIZONTAL")
See Also: IupHbox, IupVbox, IupGridBox