Page 1 of 1

ExplorerListGadget

Posted: Sat Oct 12, 2024 7:15 pm
by rndrei
How to remove the size,type,modefied columns?

Code: Select all

If OpenWindow(0, 0, 0, 500, 300, "ExplorerListGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ExplorerListGadget(1, 10, 10, 500, 300, "/home/user/examples/;*.txt" , #PB_Explorer_MultiSelect)
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf

Re: ExplorerListGadget

Posted: Sat Oct 12, 2024 7:34 pm
by TI-994A
rndrei wrote: Sat Oct 12, 2024 7:15 pm How to remove the size,type,modefied columns?

Try this:

Code: Select all

If OpenWindow(0, 0, 0, 500, 300, "ExplorerListGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ExplorerListGadget(1, 10, 10, 500, 300, GetHomeDirectory() , #PB_Explorer_MultiSelect)
  RemoveGadgetColumn(1, 1)
  RemoveGadgetColumn(1, 1)
  RemoveGadgetColumn(1, 1)
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf 

Re: ExplorerListGadget

Posted: Sat Oct 12, 2024 7:40 pm
by rndrei
Just what you need, thank you!

Re: ExplorerListGadget

Posted: Fri Apr 18, 2025 12:46 pm
by rndrei
TI-994A wrote: Sat Oct 12, 2024 7:34 pm
rndrei wrote: Sat Oct 12, 2024 7:15 pm How to remove the size,type,modefied columns?

Try this:

Code: Select all

If OpenWindow(0, 0, 0, 500, 300, "ExplorerListGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ExplorerListGadget(1, 10, 10, 500, 300, GetHomeDirectory() , #PB_Explorer_MultiSelect)
  RemoveGadgetColumn(1, 1)
  RemoveGadgetColumn(1, 1)
  RemoveGadgetColumn(1, 1)
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf 
Tell me how to remove the title (NAME)?

Re: ExplorerListGadget

Posted: Fri Apr 18, 2025 1:47 pm
by TI-994A
rndrei wrote: Fri Apr 18, 2025 12:46 pm Tell me how to remove the title (NAME)?

Code: Select all

RemoveGadgetColumn(1, 0)

Re: ExplorerListGadget

Posted: Fri Apr 18, 2025 1:52 pm
by rndrei
Then it does not show folders and files!?

Re: ExplorerListGadget

Posted: Sat Apr 19, 2025 10:36 am
by Shardik
rndrei wrote: Fri Apr 18, 2025 1:52 pm Then it does not show folders and files!?
I have modified TI-994A's example to remove the title row of the ExplorerListGadget (cross-platform; successfully tested in MacOS 'Ventura', Linux Mint 21.3 x64 'Virginia' and Windows 10 23H2 with PB 6.20 x86 and x64):

Code: Select all

If OpenWindow(0, 0, 0, 500, 300, "ExplorerListGadget",
  #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ExplorerListGadget(1, 10, 10, 500, 300, GetHomeDirectory(),
    #PB_Explorer_MultiSelect)
  RemoveGadgetColumn(1, 1)
  RemoveGadgetColumn(1, 1)
  RemoveGadgetColumn(1, 1)

  ; ----- Remove title row

  CompilerSelect #PB_Compiler_OS
    CompilerCase #PB_OS_Linux
      gtk_tree_view_set_headers_visible_(GadgetID(1), 0)
    CompilerCase #PB_OS_MacOS
      CocoaMessage(0, GadgetID(1), "setHeaderView:", 0)
    CompilerCase #PB_OS_Windows
      SetWindowLongPtr_(GadgetID(1), #GWL_STYLE, GetWindowLongPtr_(GadgetID(1),
        #GWL_STYLE) | #LVS_NOCOLUMNHEADER)
  CompilerEndSelect

  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf

Re: ExplorerListGadget

Posted: Sat Apr 19, 2025 6:13 pm
by rndrei
Works! And where can I see the list of functions GTK_?

Re: ExplorerListGadget

Posted: Sat Apr 19, 2025 7:11 pm
by mk-soft