Jump to content

GUI with a list of buttons. How can I set their positions with a variable?


Recommended Posts

I have a GUI with a long list of buttons.

Something like this

$button1 = GUICtrlCreateButton("Go", 10, 50, 25, 25)

$button2 = GUICtrlCreateButton("Go", 10, 60, 25, 25)

$button3 = GUICtrlCreateButton("Go", 10, 70, 25, 25)

$button4 = GUICtrlCreateButton("Go", 10, 80, 25, 25)

Notice how they are all 10 spaces apart.  What I would like to do is specify a Variable like this...

$Start = 50 then every time there is a new button, just add 10 to the position.  This way I could move buttons around in the list and not have to manually change the values.  or, I could change the starting 50 value to 20.  Then have the rest fall in line 30, 40, and so on...again without having to change manually....

Edited by wisem2540
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...