trouver le bon AddGadgetItem
Publié : dim. 14/janv./2007 18:07
bonjour,
voila mon probleme est que je ne trouve pu d'exemple qui montre dans un ComboBoxGadget comment savoir sur quel AddGadgetItem on clique
.
voila si vous trouver un lien car moi je ne trouve pas
sinon j'ai fait un petit code d'exemple
voila merci d'avance
@++
voila mon probleme est que je ne trouve pu d'exemple qui montre dans un ComboBoxGadget comment savoir sur quel AddGadgetItem on clique

voila si vous trouver un lien car moi je ne trouve pas

sinon j'ai fait un petit code d'exemple

Code : Tout sélectionner
;- Window Constants
Enumeration
#Window_0
EndEnumeration
;- Gadget Constants
Enumeration
#ComboBox_0
EndEnumeration
If OpenWindow(#Window_0, 216, 0, 160, 70, "test", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered )
If CreateGadgetList(WindowID(#Window_0))
ComboBoxGadget(#ComboBox_0, 10, 10, 140, 130)
AddGadgetItem(#ComboBox_0, 0, "debug 0")
AddGadgetItem(#ComboBox_0, 1, "debug 1")
AddGadgetItem(#ComboBox_0, 2, "debug 2")
AddGadgetItem(#ComboBox_0, 3, "debug 3")
AddGadgetItem(#ComboBox_0, 4, "debug 4")
AddGadgetItem(#ComboBox_0, 5, "debug 5")
AddGadgetItem(#ComboBox_0, 6, "debug 6")
AddGadgetItem(#ComboBox_0, 7, "debug 7")
SetGadgetState(#ComboBox_0, 0)
EndIf
EndIf
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_Event_Gadget
Select EventGadget()
Case #ComboBox_0
EndSelect
EndIf
Until EventID = #PB_Event_CloseWindow
@++