Je code beaucoup en se moment comme vous pouvez le constater ^^
Je suis tombé sur un autre problème :
Sur une GUI j'ai 10 radio. Le problème est que je dois traité ces dix radio en fonction des valeurs d'un tableau. Ce tableau contient 10 valeurs qui sont les captions des radio et qui s'empile à partir de 0 jusqu'à x (x < 10). Quand x est inférieur à 10 les dernières valeurs du tableau sont nul.
Donc j'avais pensé faire une boucle For allant de 0 à 9 qui traitait tout le tableau et vérifiait : si le tableau est rentré on change les valeurs des radio sinon on cache les radio :
Code : Tout sélectionner
For $i = 2 To 12 Step 1
If $i < $TableauReponses[0] Then
GUICtrlSetDate($TableauRadio[$i-2],$TableauReponses[$i])
Else
GUICtrlSetState($TableauRadio[$i-2], $GUI_HIDE)
EndIf
NextCode : Tout sélectionner
Global $TableauRadio[0] = GUICtrlCreateRadio("", 72, 144, 113, 17)
Global $TableauRadio[1] = GUICtrlCreateRadio("", 72, 160, 113, 17)
Global $TableauRadio[2] = GUICtrlCreateRadio("", 72, 176, 113, 17)
Global $TableauRadio[3] = GUICtrlCreateRadio("", 72, 192, 113, 17)
Global $TableauRadio[4] = GUICtrlCreateRadio("", 72, 208, 113, 17)
Global $TableauRadio[5] = GUICtrlCreateRadio("", 72, 224, 113, 17)
Global $TableauRadio[6] = GUICtrlCreateRadio("", 72, 240, 113, 17)
Global $TableauRadio[7] = GUICtrlCreateRadio("", 72, 256, 113, 17)
Global $TableauRadio[8] = GUICtrlCreateRadio("", 72, 272, 113, 17)
Global $TableauRadio[9] = GUICtrlCreateRadio("", 72, 288, 113, 17)Sauf que déclarer de cette manière me crée une erreur de syntaxe :/
Sinon avant j'avais déclaré comme suit :
Code : Tout sélectionner
Global $TableauRadio[0] = GUICtrlCreateRadio("", 72, 144, 113, 17)
Global $Radio1 = GUICtrlCreateRadio("", 72, 160, 113, 17)
Global $Radio2 = GUICtrlCreateRadio("", 72, 176, 113, 17)
...Code : Tout sélectionner
GUICtrlSetDate($Radio & $i ,$TableauReponses[$i])Merci à vous.
PS : Les couleurs ne se mettent pas automatiquement quand on met du code dans les balises "code" ?
Edit : Problème Résolu tout seul ><
Désolé pour ma bêtise j'ai déclarer le tableau plus haut et après j'ai remis un global ...

