AoRaToS Posted February 13, 2009 Share Posted February 13, 2009 I want to create many radio buttons in a loop, their coordinates are not the same, but there is a pattern, I want 72 radio buttons $Radio[0] = GUICtrlCreateRadio("", 210, 95, 15, 15) $Radio[1] = GUICtrlCreateRadio("", 225, 90, 15, 15) $Radio[2] = GUICtrlCreateRadio("", 240, 95, 15, 15) $Radio[3] = GUICtrlCreateRadio("", 205, 110, 15, 15) $Radio[4] = GUICtrlCreateRadio("", 225, 110, 15, 15) $Radio[5] = GUICtrlCreateRadio("", 245, 110, 15, 15) $Radio[6] = GUICtrlCreateRadio("", 210, 125, 15, 15) $Radio[7] = GUICtrlCreateRadio("", 225, 130, 15, 15) $Radio[8] = GUICtrlCreateRadio("", 240, 125, 15, 15) These are the first 9 and the rest should be the same 9 only the $Radio[] should increase by one for every radio, I can do it the simple way, declare them all like this but I would prefer a for loop, I'm not calm enough at the moment to think :/ Anyone care to help? I tought of this: $y = 0 For $x = 0 to $x = 7 $Radio[$y+$x] = GUICtrlCreateRadio("", 210, 95, 15, 15) $Radio[$y+$x+1] = GUICtrlCreateRadio("", 225, 90, 15, 15) $Radio[$y+$x+2] = GUICtrlCreateRadio("", 240, 95, 15, 15) $Radio[$y+$x+3] = GUICtrlCreateRadio("", 205, 110, 15, 15) $Radio[$y+$x+4] = GUICtrlCreateRadio("", 225, 110, 15, 15) $Radio[$y+$x+5] = GUICtrlCreateRadio("", 245, 110, 15, 15) $Radio[$y+$x+6] = GUICtrlCreateRadio("", 210, 125, 15, 15) $Radio[$y+$x+7] = GUICtrlCreateRadio("", 225, 130, 15, 15) $Radio[$y+$x+8] = GUICtrlCreateRadio("", 240, 125, 15, 15) $y = ($x + 1) * 9 Next Will it work? s!mpL3 LAN Messenger Current version 2.9.9.1 [04/07/2019] s!mpL3 LAN Messenger.zip s!mpL3 Link to comment Share on other sites More sharing options...
Authenticity Posted February 13, 2009 Share Posted February 13, 2009 For $i = 0 To 2 $Radio[$i] = GUICtrlCreateRadio("", $i*15+210, Mod($i+1, 2)*5+95, 15, 15) $Radio[$i+3] = GUICtrlCreateRadio("", $i*15+205, 110, 15, 15) $Radio[$i+6] = GUICtrlCreateRadio("", $i*15+210, Mod($i+1, 2)*5+125, 15, 15) Next ? Link to comment Share on other sites More sharing options...
AoRaToS Posted February 13, 2009 Author Share Posted February 13, 2009 (edited) Will that create 72 Radio boxes? I tried it and it didn't create the circle that I want and only 9 radios.. I want 72, each 9 at the same coordinates, hidden, so that I can show each 9 I want every time something is clicked Edited February 13, 2009 by AoRaToS s!mpL3 LAN Messenger Current version 2.9.9.1 [04/07/2019] s!mpL3 LAN Messenger.zip s!mpL3 Link to comment Share on other sites More sharing options...
Authenticity Posted February 13, 2009 Share Posted February 13, 2009 For $i = 0 To 2 $Radio[$j][$i] = GUICtrlCreateRadio("", $i*15+210, Mod($i+1, 2)*5+90, 15, 15) $Radio[$j][$i+3] = GUICtrlCreateRadio("", $i*20+205, 110, 15, 15) $Radio[$j][$i+6] = GUICtrlCreateRadio("", $i*15+210, Mod($i, 2)*5+125, 15, 15) NextoÝ÷ ØÌ©¢æjØd%yض¬¢wæzƧǷ%y8^v(ëax%GºÚ"µÍ[H ÌÍÔY[ÜÖÎVÎWBÜ ÌÍÚHÈ ÂÜ ÌÍÚHHÈ^^ 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