wisem2540 Posted May 23, 2013 Share Posted May 23, 2013 (edited) 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 May 23, 2013 by wisem2540 Link to comment Share on other sites More sharing options...
hiho Posted May 24, 2013 Share Posted May 24, 2013 Global $button[6], $start = 50, $x = 10 For $i = 0 to Uboud($button) - 1 $button[$i] = GUICtrlCreateButton("Button " & $i, 10, $start + $x * $i, 25, 25) Next Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now