TreeGadget Node symbol

Just starting out? Need help? Post your questions and find answers here.
User avatar
blueb
Addict
Addict
Posts: 1044
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Re: TreeGadget Node symbol

Post by blueb »

Check out Kukulkan's Custom Tree Gadget...

http://www.purebasic.fr/english/viewtop ... 81#p471581
- It was too lonely at the top.

System : PB 6.10 LTS (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: TreeGadget Node symbol

Post by Josh »

Code: Select all

  If OpenWindow(0, 0, 0, 355, 180, "TreeGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    TreeGadget(0,  10, 10, 160, 160)
    TreeGadget(1, 180, 10, 160, 160)
    SetWindowTheme_(GadgetID (1), @"Explorer", 0)
    For ID = 0 To 1
      For a = 0 To 10
        AddGadgetItem (ID, -1, "Normal Item "+Str(a), 0, 0)
        AddGadgetItem (ID, -1, "Node "+Str(a), 0, 0)
        AddGadgetItem(ID, -1, "Sub-Item 1", 0, 1)
        AddGadgetItem(ID, -1, "Sub-Item 2", 0, 1)
        AddGadgetItem(ID, -1, "Sub-Item 3", 0, 1)
        AddGadgetItem(ID, -1, "Sub-Item 4", 0, 1)
        AddGadgetItem (ID, -1, "File "+Str(a), 0, 0)
      Next
    Next
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf
sorry for my bad english
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: TreeGadget Node symbol

Post by Josh »

mohsen wrote:Thank you very much.
Your codes are interesting. But two questions :
1- Does this method run correctly in old windows?
2- What is "Explorer" in SetWindowTheme? Is it possible to change?
Sorry, I don't know
sorry for my bad english
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: TreeGadget Node symbol

Post by RSBasic »

mohsen wrote:1- Does this method run correctly in old windows?
Windows Vista or higher. "Explorer" is ignored on older operating systems.
mohsen wrote:2- What is "Explorer" in SetWindowTheme? Is it possible to change?
"Explorer" is a fixed name and is the name of the new control theme from Windows Vista and higher.
Image
Image
Post Reply