Sets absolute coordinates for the next control.
GUISetCoord ( left, top [, width [, height [, winhandle]]] )
Parameters
| left | The left side of the control. |
| top | The top of the control. |
| width | [optional] The width of the control (default is the previously used width). |
| height | [optional] The height of the control (default is the previously used height). |
| winhandle | [optional] Windows handle as returned by GUICreate (default is the previously used). |
Return Value
| Success: | Returns 1. |
| Failure: | Returns 0. |
Remarks
To be used specifically in Opt ("GUICoordMode", 2). It allows you to set the current position to a precise point and from that position to create controls by row (x_offset,-1) or by columns (-1, y_offset).
Related
GUICtrlCreate...
Example
#include <GUIConstantsEx.au3>
Opt('MustDeclareVars', 1)
Example()
Func Example()
Local $msg
Opt("GUICoordMode", 2) ; relative to cell mode
GUICreate("My GUI Set Coord", 200, 100)
GUICtrlCreateCheckbox("Check #1", 20, 10, 75)
GUICtrlCreateCheckbox("Notify #2", 10, -1) ; next cell in the line
GUISetCoord(20, 60)
GUICtrlCreateButton("OK #3", -1, -1)
GUICtrlCreateButton("Cancel #4", 10, -1)
GUICtrlSetState(-1, $GUI_FOCUS)
GUISetState() ; will display an empty dialog box
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
EndFunc ;==>Example