Function Reference


GUISetCoord

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 window).

Return Value

Success: 1.
Failure: 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>

Example()

Func Example()
        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(@SW_SHOW) ; will display an empty dialog box

        ; Loop until the user exits.
        While 1
                Switch GUIGetMsg()
                        Case $GUI_EVENT_CLOSE
                                ExitLoop

                EndSwitch
        WEnd

        GUIDelete()
EndFunc   ;==>Example