Older Newer
Mon, 14 Apr 2008 08:28:55 . . . . afh [Initial page for setDialogPos]


Changes by last author:

Added:
= setDialogPos =

== Syntax ==

:setDialogPos(bool fAbs, int x, int y, int w, int h)

== Arguments ==

:fAbs

::A Boolean flag indicating whether x and y are absolute screen coordinates (fAbs == true), or whether they are relative to the client area (fAbs == false). If x == -1 and y == -1, then fAbs indicates whether the dialog is to be centered within the host client area (fAbs == false) or the working area of the entire screen (fAbs == true).

:x

::The x coordinate of the upper-left corner of the filter dialog (in DBUs).

:y

::The y coordinate of the upper-left corner of the filter dialog (in DBUs).

:w

::The width of the filter dialog (in DBUs).

:h

::The height of the filter dialog (in DBUs).

== Description ==

:Sets the position and size of the filter dialog window. If fAbs is true, x and y are absolute screen coordinates; otherwise, x and y are relative to the upper-left corner of the client area in the host application's main window. If x and y are set to -1, the dialog window will be centered within the host client area or the working area of the entire screen, depending on whether fAbs is false or true, respectively. Otherwise, if either x or y is negative, the position of the dialog will not be changed. If w or h is negative, the size of the dialog window will not be changed.

<code>

</code>

:All measurements are in dialog box units (DBUs).

== Examples ==

<code>

/* Set dialog to absolute position (70, 80), width 120, height 60... */

setDialogPos( true, 70, 80, 120, 60 );

/* Change dialog width to 110, height to 50, without moving upper-left corner... */

setDialogPos( false, -1, 0, 110, 50 );

/* Center dialog within the host client area, without changing the size... */

setDialogPos( false, -1, -1, -1, 0 );

</code>

== Also see ==

:getDialogWidth, getDialogHeight

== Comments ==

:The use of negative coordinates as flag values conflicts with window coordinates in a multi-monitor environment. These flag values may change in a future release.

<code>

</code>

:Everyone can add his/her comments and experiences with this function here. Tips for using it are welcome, too.