ExplorerListGadget top most root folder

Just starting out? Need help? Post your questions and find answers here.
Rinzwind
Enthusiast
Enthusiast
Posts: 638
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

ExplorerListGadget top most root folder

Post by Rinzwind »

Is it possible to somehow set a 'hard' root folder? Eg navigating through folders is possible but only up to the root folder, not further up.
breeze4me
Enthusiast
Enthusiast
Posts: 527
Joined: Thu Mar 09, 2006 9:24 am
Location: S. Kor

Re: ExplorerListGadget top most root folder

Post by breeze4me »

The RemoveGadgetItem() command seems to work with the ExplorerListGadget on Windows.

Code: Select all

If OpenWindow(0, 0, 0, 400, 200, "ExplorerListGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ExplorerListGadget(0, 10, 10, 380, 180, "c:\*.*", #PB_Explorer_MultiSelect)
  
  Repeat
    e = WaitWindowEvent()
    
    If e = #PB_Event_Gadget And EventGadget() = 0 And EventType() = #PB_EventType_Change
      If Right(GetGadgetText(0), 2) = ":\" And GetGadgetItemText(0, 0) = ".."
        RemoveGadgetItem(0, 0)
      EndIf
      
    EndIf
    
  Until e = #PB_Event_CloseWindow
EndIf
Rinzwind
Enthusiast
Enthusiast
Posts: 638
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: ExplorerListGadget top most root folder

Post by Rinzwind »

Ah, KISS solution, I like it :) Thanks
Post Reply