# IupShow

Definition: | include pGUI.e IupShow(Ihandle ih, integer x=IUP_CURRENT, y=IUP_CURRENT) -- or -- IupShowXY(Ihandle ih, integer x=IUP_CURRENT, y=IUP_CURRENT)
Description: | Displays a dialog, optionally in a given position on the screen. Unlike the C API and thanks to optional parameters there is no need for a separate IupShowXY() routine, however one is provided for compatibility/convenience.
pwa/p2js: | Supported.
Comments: | ih: identifier of the dialog. x: horizontal position of the top left corner of the window, relative to the origin of the main screen. The following definitions can also be used: IUP_LEFT: Positions the dialog on the left corner of the screen IUP_CENTER: Horizontally centralizes the dialog on the screen IUP_RIGHT: Positions the dialog on the right corner of the screen IUP_MOUSEPOS: Positions the dialog on the mouse position IUP_CENTERPARENT: Horizontally centralizes the dialog relative to its parent (Since 3.0) IUP_CURRENT: use the current position of the dialog, IUPCENTER if not known. IUP_LEFTPARENT: Positions the element on the left border of its parent. Not valid for menus. (Since 3.29) IUP_RIGHTPARENT: Positions the element on the right border of its parent. Not valid for menus. (Since 3.29) y: vertical position of the top left corner of the window, relative to the origin of the main screen. The following definitions can also be used: IUP_TOP: Positions the dialog on the top of the screen IUP_CENTER: Vertically centralizes the dialog on the screen IUP_BOTTOM: Positions the dialog on the base of the screen IUP_MOUSEPOS: Positions the dialog on the mouse position IUP_CENTERPARENT: Vertically centralizes the dialog relative to its parent (Since 3.0) IUP_CURRENT: use the current position of the dialog, IUP_CANTER if nont known. IUP_TOPPARENT: Positions the element on the top border of its parent. Not valid for menus. (Since 3.29) IUP_BOTTOMPARENT: Positions the element on the bottom border of its parent. Not valid for menus. (Since 3.29) If the dialog needs to be mapped and the current position is not known then the dialog is centered. x and y positions are the same as returned by the SCREENPOSITION attribute. Calling IupShow and setting the VISIBLE attribute to YES are equivalent. Will call IupMap for the element. See the PLACEMENT attribute for other position and show options. When IUP_CURRENT is used at the first time the dialog is shown then it will be replaced by IUP_CENTERPARENT. When IUP_CENTERPARENT is used but PARENTDIALOG is not defined then it is replaced by IUP_CENTER. The main screen size does not include additional monitors. This function can be executed more than once for the same dialog. This will make the dialog be placed above all other dialogs in the application, changing its Z-order, and update its position and/or size on screen. IMPORTANT: Calling IupShow for a visible dialog shown with IupPopup does nothing.
Example: |
    IupShowXY(hDialog, IUP_CURRENT, IUP_CURRENT)
See Also: | IupShowXY, IupHide, IupPopup, IupMap