Jump to content

How to use GUICoordmode?


PantZ4
 Share

Recommended Posts

So how do you use Coordmode with GUI creation?

I was wondering if I could used it like this; Control 1 gets placed in x10,y15 and Control 2 would be placed in Control 1s x + 10 and Control 1s y + 15?

E.g. it would use the previous control xy for the next control, so you can keep "building" upon.

Or have I miss understand the coordmode? Sorry, English aren't my native language. Possible to provide an example?

Link to comment
Share on other sites

Example:

#include <GUIConstantsEx.au3>

$hGUI = GUICreate("Coord Mode Test", 300, 200)

GUISetCoord(10, 10) ;sets X, Y coordinates

GUICtrlCreateLabel("Label", -1, -1, 100, 16)

GUICtrlCreateButton("Test", -1 + 20, -1 + 30, 75, 23)

GUICtrlCreateInput("Test", -1 + 40, -1 + 60, 100, 23)

GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...