J'ai un soucis avec mon ExplorerListGadget(), je voudrai qu'il me Debug le chemin du dossier que j'ouvre quand je double clic dessus. Or le problème est que soit :
- il me debug 2 fois le même dossier à chaque fois que je sélectionne ou double clic sur un dossier
- soit si j'utilise un #PB_EventType_LeftDoubleClick il ne me prend en compte pas le dossier comme
un élément et il ne se passe donc rien.
Il doit surement y a voir un moyen mais j'avoue je trouve pas là.
Merci de votre aide.
Code : Tout sélectionner
Global Left_Combo$ = "C:\"
#Flag = #PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_SizeGadget|#PB_Window_WindowCentered|#PB_Window_Maximize
#Flag_XplorerList = #PB_Explorer_AlwaysShowSelection|#PB_Explorer_FullRowSelect|#PB_Explorer_NoDriveRequester
Global NewList History.s()
T_x_Window = 1440
T_y_Window = 820
Procedure Historing(iLocation$)
If FileSize(iLocation$) < 0
AddElement(History()) : History() = iLocation$
Debug History()
EndIf
EndProcedure
OpenWindow(0, 0, 0, T_x_Window, T_y_Window, "Double Xplorer", #Flag)
ExplorerComboGadget(11, 5, 38, (T_x_Window/2)-9, T_y_Window-39-40, Left_Combo$, #PB_Explorer_Editable)
ExplorerListGadget(12, 6, 63, (T_x_Window/2)-9, T_y_Window-95, Left_Combo$, #Flag_XplorerList)
SetGadgetItemAttribute(12, 0, #PB_Explorer_ColumnWidth, 400, 0)
SetGadgetItemAttribute(12, 0, #PB_Explorer_ColumnWidth, 95, 1)
SetGadgetItemAttribute(12, 0, #PB_Explorer_ColumnWidth, 95, 2)
SetGadgetItemAttribute(12, 0, #PB_Explorer_ColumnWidth, 117, 3)
Quit = 0
Repeat
Event = WaitWindowEvent()
Select EventWindow()
Case 0
Select Event
Case #PB_Event_CloseWindow : Quit = 1
Case #PB_Event_Gadget
Select EventGadget()
Case 11
Path_Left_Combo$ = GetGadgetText(11)
SetGadgetText(12, Path_Left_Combo$)
Case 12
Path_Left_XplorerList$ = GetGadgetText(12)
SetGadgetText(11, Path_Left_XplorerList$)
posL = GetGadgetState(12)
File_Left_XplorerList$ = GetGadgetItemText(12, posL)
If EventType() = #PB_EventType_LeftDoubleClick
If FileSize(Path_Left_XplorerList$+File_Left_XplorerList$) < 0
Historing(Path_Left_XplorerList$+File_Left_XplorerList$)
Else
RunProgram(Path_Left_XplorerList$+File_Left_XplorerList$)
EndIf
EndIf
EndSelect
EndSelect
EndSelect
Until Quit = 1