je voudrais fais un truc banal mais impossible pour moi

Code : Tout sélectionner
;{- Enumerations
;{ Windows
Enumeration
#Window_0
EndEnumeration
;}
;{ Status bars
Enumeration
#StatusBar_Window_0
EndEnumeration
;}
;{ Gadgets
Enumeration
#ExplorerComboGadget
#ExplorerListGadget_0
EndEnumeration
Global Disk$
Disk$ = "C:\"
;}
;}
Procedure OpenWindow_Window_0()
If OpenWindow(#Window_0, 170, 120, 652, 410, "Example", #PB_Window_SystemMenu|#PB_Window_TitleBar|#PB_Window_SizeGadget|#PB_Window_MaximizeGadget|#PB_Window_MinimizeGadget)
CreateGadgetList(WindowID(#Window_0))
ExplorerComboGadget(#ExplorerComboGadget, 1, 3, 650, 200, Disk$, #PB_Explorer_Editable)
ExplorerListGadget(#ExplorerListGadget_0, 0, 30, 651, 360, Disk$, #PB_Explorer_MultiSelect|#PB_Explorer_AutoSort);|#PB_Explorer_FullRowSelect)
SetGadgetItemAttribute(#ExplorerListGadget_0, 0,#PB_Explorer_ColumnWidth, 330)
CreateStatusBar(#StatusBar_Window_0, WindowID(#Window_0))
; Gadget Resizing
;PureRESIZE_SetGadgetResize(#ExplorerListGadget_0, 1, 1, 1, 1)
;PureRESIZE_SetGadgetResize(#ExplorerComboGadget, 1, 1, 1, 1)
EndIf
EndProcedure
OpenWindow_Window_0()
Repeat
Select WaitWindowEvent()
; ///////////////////
Case #PB_Event_Gadget
EventGadget = EventGadget()
EventType = EventType()
Select EventGadget()
Case #ExplorerComboGadget:Disk$ = GetGadgetText(#ExplorerComboGadget)
SetGadgetText(#ExplorerListGadget_0, Disk$)
Case #ExplorerListGadget_0
If EventType() = #PB_EventType_LeftDoubleClick
MessageRequester("Info","double clique",#MB_ICONINFORMATION|#MB_OK)
EndIf
EndSelect
; //////////////////////
Case #PB_Event_CloseWindow
EventWindow = EventWindow()
If EventWindow = #Window_0
Break
EndIf
EndSelect
ForEver
;comment faire pour qu'après sélection, ExplorerComboGadget perd le focus et le donne à explorerList ?
;sinon on clique 2 fois avant de pouvoir sélectionner un élément après un changement de répertoire !