ExplorerListGadget

Linux specific forum
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 151
Joined: Thu Dec 28, 2023 9:04 pm

ExplorerListGadget

Post 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
User avatar
TI-994A
Addict
Addict
Posts: 2698
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: ExplorerListGadget

Post 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 
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 151
Joined: Thu Dec 28, 2023 9:04 pm

Re: ExplorerListGadget

Post by rndrei »

Just what you need, thank you!
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 151
Joined: Thu Dec 28, 2023 9:04 pm

Re: ExplorerListGadget

Post 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)?
User avatar
TI-994A
Addict
Addict
Posts: 2698
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: ExplorerListGadget

Post 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)
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 151
Joined: Thu Dec 28, 2023 9:04 pm

Re: ExplorerListGadget

Post by rndrei »

Then it does not show folders and files!?
User avatar
Shardik
Addict
Addict
Posts: 2058
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: ExplorerListGadget

Post 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
User avatar
rndrei
Enthusiast
Enthusiast
Posts: 151
Joined: Thu Dec 28, 2023 9:04 pm

Re: ExplorerListGadget

Post by rndrei »

Works! And where can I see the list of functions GTK_?
User avatar
mk-soft
Always Here
Always Here
Posts: 6201
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: ExplorerListGadget

Post by mk-soft »

My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply