Bonsoir :
Est-il possible de positionner 2 boutons de type "Radio" au même emplacement graphique et qui soient soumis à un autre bouton Radio ?
Exemple simplifié :
Groupe 1 :
GUIRadio 1 "je suis radio 1" (checked par défaut)
GUIRadio 2 "je suis radio 2"
Groupe 2 :
GUIRadio3 "je suis radio 3" (checked par défaut)
GUIRadio4 "je suis radio 4" (même emplacement graphique que Radio 3)
Je voudrai qu'en cliquant sur le radio 2, le radio 4 prenne le dessus et (en l'occurrence) "cache/disable" la radio 3.
Et à l'inverse ensuite, en re-cliquant sur le radio 1, le radio 3 reprenne le dessus sur le radio 4
Merci
Louis
2 radios au même emplacement graphique
Règles du forum
- Merci de consulter la section "Règles du forum" et plus particulièrement "Règles et Mentions Légales du site autoitscript.fr" avant d'écrire un message.
- walkson
- Modérateur
- Messages : 1020
- Enregistré le : ven. 12 août 2011 19:49
- Localisation : Hurepoix
- Status : Hors ligne
Re: 2 radios au même emplacement graphique
Bonjour et bienvenue
Comme cela ?
Comme cela ?
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("", 343, 126, 192, 124)
GUIStartGroup()
Global $Radio3 = GUICtrlCreateRadio("Radio3", 40, 24, 89, 25)
GUICtrlSetState(-1, $GUI_CHECKED)
Global $Radio4 = GUICtrlCreateRadio("Radio4", 40, 24, 89, 25)
GUICtrlSetState($Radio4, $GUI_HIDE)
GUIStartGroup()
GUIStartGroup()
Global $Radio1 = GUICtrlCreateRadio("Radio1", 192, 24, 89, 25)
GUICtrlSetState(-1, $GUI_CHECKED)
Global $Radio2 = GUICtrlCreateRadio("Radio2", 192, 56, 89, 25)
GUIStartGroup()
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Radio1
GUICtrlSetState($Radio3, $GUI_CHECKED)
GUICtrlSetState($Radio3, $GUI_SHOW)
GUICtrlSetState($Radio4, $GUI_HIDE)
Case $Radio2
GUICtrlSetState($Radio4, $GUI_CHECKED)
GUICtrlSetState($Radio3, $GUI_HIDE)
GUICtrlSetState($Radio4, $GUI_SHOW)
EndSwitch
WEnd
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("", 343, 126, 192, 124)
GUIStartGroup()
Global $Radio3 = GUICtrlCreateRadio("Radio3", 40, 24, 89, 25)
GUICtrlSetState(-1, $GUI_CHECKED)
Global $Radio4 = GUICtrlCreateRadio("Radio4", 40, 24, 89, 25)
GUICtrlSetState($Radio4, $GUI_HIDE)
GUIStartGroup()
GUIStartGroup()
Global $Radio1 = GUICtrlCreateRadio("Radio1", 192, 24, 89, 25)
GUICtrlSetState(-1, $GUI_CHECKED)
Global $Radio2 = GUICtrlCreateRadio("Radio2", 192, 56, 89, 25)
GUIStartGroup()
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Radio1
GUICtrlSetState($Radio3, $GUI_CHECKED)
GUICtrlSetState($Radio3, $GUI_SHOW)
GUICtrlSetState($Radio4, $GUI_HIDE)
Case $Radio2
GUICtrlSetState($Radio4, $GUI_CHECKED)
GUICtrlSetState($Radio3, $GUI_HIDE)
GUICtrlSetState($Radio4, $GUI_SHOW)
EndSwitch
WEnd
Cordialement,
Walkson
"Horas non numero nisi serenas " Le canon de midi
(Je ne compte que les heures heureuses)
Walkson
"Horas non numero nisi serenas " Le canon de midi
(Je ne compte que les heures heureuses)
Re: 2 radios au même emplacement graphique
Merci beaucoup, c'est bien cela ce dont je cherchais
Bonne journée
Bonne journée