Code : Tout sélectionner
Enumeration
#StatusBar_0
EndEnumeration
If OpenWindow(0, 0, 0, 270, 140, "ComboBoxGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0))
ComboBoxGadget(#StatusBar_0, 10, 40, 250, 100)
For a = 1 To 5 : AddGadgetItem(#StatusBar_0, -1,"liste déroulante " + Str(a)) : Next a
SetGadgetState(#StatusBar_0, 0) ; sélectionne le troisième élément (la numérotation commence à 0)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
je voudrais faire pareil sur ce bout de code mais il ne déroule pas
une fois qu'il déroule comment dire si choix=1 faire.....
si quelqu'un me m'aider....
Code : Tout sélectionner
;- Window Constants
;
Enumeration
#Window_0
#PB_EventGadget
EndEnumeration
;- Gadget Constants
;
Enumeration
#ListeRead
#String_0
#String_1
#Personnalise
#Valide_0
#Valide_1
EndEnumeration
;- StatusBar Constants
;
Enumeration
#StatusBar_0
EndEnumeration
If OpenWindow(#Window_0, 216, 0, 239, 63, "titre",#PB_Window_SystemMenu |#PB_Window_ScreenCentered | #PB_Window_TitleBar)
If CreateStatusBar(#StatusBar_0, WindowID(#Window_0))
EndIf
If CreateGadgetList(WindowID(#Window_0))
ComboBoxGadget(#ListeRead, 0, 0, 130, 20)
For a = 1 To 5 : AddGadgetItem(#StatusBar_0, -1,"liste déroulante " + Str(a)) : Next a
SetGadgetState(#StatusBar_0, 0) ; sélectionne le troisième élément (la numérotation commence à 0)
StringGadget(#String_0, 130, 0, 70, 20, "")
StringGadget(#String_1, 130, 20, 70, 20, "00:00:00")
StringGadget(#Personnalise, 0, 20, 130, 20, "Personnalisé :")
ButtonGadget(#Valide_0, 200, 0, 40, 20, "OK")
ButtonGadget(#Valide_1, 200, 20, 40, 20, "OK")
EndIf
Repeat
Event=WaitWindowEvent()
If Event=#PB_Event_Gadget
If EventType()=#PB_EventType_LeftClick
Select EventGadget()
Case #Valide_0
End
Case #Valide_1
End
EndSelect
EndIf
EndIf
Until Event=#PB_Event_CloseWindow
EndIf