IupShowXY

Definition: include pGUI.e

IupShowXY(Ihandle ih, integer x=IUP_CURRENT, y=IUP_CURRENT)
Description: Displays a dialog in a given position on the screen.
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. This is the default value in Lua if the parameter is not defined. (Since 3.0)
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. This is the default value in Lua if the parameter is not defined.(Since 3.0)
Notes: Will call IupMap for the element.

x and y positions are the same as returned by the SCREENPOSITION attribute.

See the PLACEMENT attribute for other position and show options.

When IUP_CENTERPARENT is used but PARENTDIALOG is not defined then it is replaced by IUP_CENTER.

When IUP_CURRENT is used at the first time the dialog is shown then it will be replaced by IUP_CENTERPARENT.

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 IupShowXY for a visible dialog shown with IupPopup does nothing.
Example:
IupShowXY(hDialog, IUP_CURRENT, IUP_CURRENT)
See Also: IupShow, IupHide, IupPopup, IupMap