ExplorerListGadget OFF

Just starting out? Need help? Post your questions and find answers here.
User avatar
SPH
Enthusiast
Enthusiast
Posts: 593
Joined: Tue Jan 04, 2011 6:21 pm

ExplorerListGadget OFF

Post by SPH »

Hi,

After a long time without coding, I lost my touch.
Here is a minimalistic code that I hope is complete.
Is it?
Another question: why don't I have the list of files in ExplorerListGadget?

Code: Select all

If OpenWindow(0, 0, 0, 760,480, "ExplorerTreeGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) 
  ExplorerTreeGadget(1, 11, 73, 230, 280, Repertoire$, #PB_Explorer_NoFiles)
  ExplorerListGadget(2, 247,73,490,280, "*.*", #PB_Explorer_NoFolders|#PB_Explorer_NoParentFolder)
  SendMessage_(GadgetID(2),#LVM_SETCOLUMNWIDTH,0,188) ; largeur colonne
  SendMessage_(GadgetID(2),#LVM_SETCOLUMNWIDTH,1,80)  ; largeur colonne
  Repeat
    Select EventGadget()
        ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; menu contextuel  
      Case 1 ; Afficher les fichiers du répertoire sélectionné
        Select type
          Case #PB_EventType_LeftClick
        EndSelect
    EndSelect
  Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf 

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 6.12LTS - 64 bits
User avatar
jacdelad
Addict
Addict
Posts: 2031
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: ExplorerListGadget OFF

Post by jacdelad »

Your loop is crooked:" type" is not defined nor ever gets a value assigned and after klicking an item in the left list, you do...nothing.

Code: Select all

If OpenWindow(0, 0, 0, 760,480, "ExplorerTreeGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) 
  ExplorerTreeGadget(1, 11, 73, 230, 280, Repertoire$, #PB_Explorer_NoFiles)
  ExplorerListGadget(2, 247,73,490,280, "*.*", #PB_Explorer_NoFolders|#PB_Explorer_NoParentFolder)
  SendMessage_(GadgetID(2),#LVM_SETCOLUMNWIDTH,0,188) ; largeur colonne
  SendMessage_(GadgetID(2),#LVM_SETCOLUMNWIDTH,1,80)  ; largeur colonne
  Repeat
    Select EventGadget()
        ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; menu contextuel  
      Case 1 ; Afficher les fichiers du répertoire sélectionné
        Select EventType()
          Case #PB_EventType_LeftClick
            SetGadgetText(2,GetGadgetText(1))
        EndSelect
    EndSelect
  Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf 
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
SPH
Enthusiast
Enthusiast
Posts: 593
Joined: Tue Jan 04, 2011 6:21 pm

Re: ExplorerListGadget OFF

Post by SPH »

Thanks :idea:

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 6.12LTS - 64 bits
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: ExplorerListGadget OFF

Post by infratec »

Code: Select all

EnableExplicit
:!:
User avatar
SPH
Enthusiast
Enthusiast
Posts: 593
Joined: Tue Jan 04, 2011 6:21 pm

Re: ExplorerListGadget OFF

Post by SPH »

But be aware that a codes which worked on PB 5.73_x64 no longer work on PB 6.x_x64 :idea:

!i!i!i!i!i!i!i!i!i!
!i!i!i!i!i!i!
!i!i!i!
//// Informations ////
Portable LENOVO ideapad 110-17ACL 64 bits
Version de PB : 6.12LTS - 64 bits
User avatar
jacdelad
Addict
Addict
Posts: 2031
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: ExplorerListGadget OFF

Post by jacdelad »

SPH wrote: Thu Aug 08, 2024 8:48 pm But be aware that a codes which worked on PB 5.73_x64 no longer work on PB 6.x_x64 :idea:
I wouldn't generalize it that way...
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Quin
Addict
Addict
Posts: 1135
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: ExplorerListGadget OFF

Post by Quin »

SPH wrote: Thu Aug 08, 2024 8:48 pm But be aware that a codes which worked on PB 5.73_x64 no longer work on PB 6.x_x64 :idea:
It sounds like you may have some .l's that are supposed to be .i or similar ;-)
Make sure all your pointers are stored in integers. 6.10 enabled a security feature that makes memory-based attacks more difficult, but the result is that the addresses are now quite often larger than the 32-bit range.
Post Reply