IupRefresh

IUP - Portable User Interface

IupRefresh

Updates the size and layout of controls after changing size attributes. Can be used for any element inside a dialog, but the dialog layout will be updated. It can change the layout of all the controls inside the dialog because of the dynamic layout positioning.

Parameters/Return

int IupRefresh(Ihandle *ih); [in C]
iup.Refresh(ih: ihandle) -> (ret: number) [in Lua]

ih: identifier of the interface element.

Notes

Can be used for any control, but it will always affects the hole dialog.

The elements are immediately repositioned.

This function will NOT change the size of the dialog, except when the SIZE or RASTERSIZE attributes of the dialog where changed before the call.

If you also want to change the size of the dialog use:

IupSetAttribute(dialog, "SIZE", ...);
IupRefresh(dialog);

So the dialog will be resized for the new User size, if the new size is NULL the dialog will be resized to the Natural size that include all the elements.

Changing the size of elements without changing the dialog size may position some controls outside the dialog area at the left or bottom borders (the elements will be cropped at the dialog borders).

IupMap also updates the dialog layout even if it is already mapped, so using it or using IupShow, IupShowXY or IupPopup (they all call IupMap) will also update the dialog layout.

See Also

SIZE, IupMap