annuler option double clic

Vous débutez et vous avez besoin d'aide ? N'hésitez pas à poser vos questions
Avatar de l’utilisateur
venom
Messages : 3138
Inscription : jeu. 29/juil./2004 16:33
Localisation : Klyntar
Contact :

annuler option double clic

Message par venom »

bonjour,

voila je souhaiterai savoir si il existe un moyen pour ne pas pouvoir faire un double clic dans un ExplorerListGadget() ?
car je me suis pencher sur le sujet donc j'ai trouver coter EventType() jusque la tout fonctionne sauf que je souhaite détecter un double clic sur un dossier et non sur un fichier et la sa coince :?



@++
Windows 10 x64, PureBasic 5.73 x86 & x64
GPU : radeon HD6370M, CPU : p6200 2.13Ghz
Le Soldat Inconnu
Messages : 4312
Inscription : mer. 28/janv./2004 20:58
Localisation : Clermont ferrand OU Olsztyn
Contact :

Message par Le Soldat Inconnu »

C'est à dire que sur double clic sur un dossier, tu lances une action et que l'exploreur ne change pas de dossier ?
Je ne suis pas à moitié Polonais mais ma moitié est polonaise ... Vous avez suivi ?

[Intel quad core Q9400 2.66mhz, ATI 4870, 4Go Ram, XP (x86) / 7 (x64)]
Avatar de l’utilisateur
venom
Messages : 3138
Inscription : jeu. 29/juil./2004 16:33
Localisation : Klyntar
Contact :

Message par venom »

oui c'est sa enfaite je souhaiterai cliquer sur un dossier dans un ExplorerListGadget(). et que le contenue de ce dernier s'affiche dans un autre ExplorerListGadget() qui est juste a coter du 1er

voici un code vite fait pour mieu comprendre :wink: .

Code : Tout sélectionner

;- Window Constants
Enumeration
  #Window_0
EndEnumeration

;- Gadget Constants
Enumeration
  #ExplorerList_0
  #ExplorerList_1
  #Text_0
EndEnumeration

  If OpenWindow(#Window_0, 0, 0, 600, 312, "",  #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_TitleBar )
    If CreateGadgetList(WindowID(#Window_0))
      ExplorerListGadget(#ExplorerList_0, 5, 5, 235, 255, "C:\Program Files\", #PB_Explorer_NoParentFolder|#PB_Explorer_AutoSort)
       ChangeListIconGadgetDisplay(#ExplorerList_0, #PB_ListIcon_List )
      ExplorerListGadget(#ExplorerList_1, 350, 5, 235, 255, "c:\1223\", #PB_Explorer_NoParentFolder|#PB_Explorer_AutoSort)
       ChangeListIconGadgetDisplay(#ExplorerList_1, #PB_ListIcon_List )
      TextGadget(#Text_0, 5, 270, 580, 35, "je souhaiterai cliquer sur un dossier a gauche et que le résultat se met a droite sans changer celui de gauche c'est facilement faisable en faisant 1 clic mais des que je double clic et bien le 1er affiche le contenue du dossier")
     
    EndIf
  EndIf

  Repeat
   EventID = WaitWindowEvent()
    If EventID = #PB_Event_Gadget
      Select EventGadget()
      
       Case #ExplorerList_0
        repertoire$ = GetGadgetText(#ExplorerList_0)
        nomdossier$ = GetGadgetItemText(#ExplorerList_0,GetGadgetState(#ExplorerList_0), 0)
         ExplorerListGadget(#ExplorerList_1, 350, 5, 235, 255, repertoire$+nomdossier$+"\*.*", #PB_Explorer_AutoSort|#PB_Explorer_NoParentFolder)
          ChangeListIconGadgetDisplay(#ExplorerList_1, #PB_ListIcon_List )
     
      EndSelect
    EndIf
  Until EventID = #PB_Event_CloseWindow



@++
Windows 10 x64, PureBasic 5.73 x86 & x64
GPU : radeon HD6370M, CPU : p6200 2.13Ghz
Le Soldat Inconnu
Messages : 4312
Inscription : mer. 28/janv./2004 20:58
Localisation : Clermont ferrand OU Olsztyn
Contact :

Message par Le Soldat Inconnu »

Un truc de ce genre ?

Code : Tout sélectionner

;- Window Constants 
Enumeration 
  #Window_0 
EndEnumeration 

;- Gadget Constants 
Enumeration 
  #ExplorerList_0 
  #ExplorerList_1 
  #Text_0 
EndEnumeration 

RepertoireDebut.s = "C:\Program Files\"

If OpenWindow(#Window_0, 0, 0, 600, 312, "",  #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_TitleBar ) 
  If CreateGadgetList(WindowID(#Window_0)) 
    ExplorerListGadget(#ExplorerList_0, 5, 5, 235, 255, RepertoireDebut, #PB_Explorer_NoParentFolder|#PB_Explorer_AutoSort) 
    ChangeListIconGadgetDisplay(#ExplorerList_0, #PB_ListIcon_List ) 
    ExplorerListGadget(#ExplorerList_1, 350, 5, 235, 255, "c:\", #PB_Explorer_NoParentFolder|#PB_Explorer_AutoSort) 
    ChangeListIconGadgetDisplay(#ExplorerList_1, #PB_ListIcon_List ) 
    
  EndIf 
EndIf 

Repeat 
  EventID = WaitWindowEvent() 
  If EventID = #PB_Event_Gadget 
    Select EventGadget()
        
      Case #ExplorerList_0 
        NouveauRepertoire.s = GetGadgetText(#ExplorerList_0) 
        If NouveauRepertoire <> RepertoireDebut
          SetGadgetText(#ExplorerList_1, NouveauRepertoire)
          SetGadgetText(#ExplorerList_0, RepertoireDebut)
        EndIf
        
        
        
    EndSelect 
  EndIf 
Until EventID = #PB_Event_CloseWindow
Je ne suis pas à moitié Polonais mais ma moitié est polonaise ... Vous avez suivi ?

[Intel quad core Q9400 2.66mhz, ATI 4870, 4Go Ram, XP (x86) / 7 (x64)]
Avatar de l’utilisateur
venom
Messages : 3138
Inscription : jeu. 29/juil./2004 16:33
Localisation : Klyntar
Contact :

Message par venom »

:? c'était aussi simple que sa :D
oui c'est exactement un truc de ce genre la et bien merci a toi Soldat Inconnu :wink:


@++
Windows 10 x64, PureBasic 5.73 x86 & x64
GPU : radeon HD6370M, CPU : p6200 2.13Ghz
Répondre