Get treegadget from a other instance.

Just starting out? Need help? Post your questions and find answers here.
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Get treegadget from a other instance.

Post by sec »

this a first program (take from archive)

Code: Select all

If OpenWindow(0,0,0,160,202,#PB_Window_SystemMenu,"TreeGadget") And CreateGadgetList(WindowID(0))
  TreeGadget(0, 0,10,160,200)                                       ; TreeGadget standard
  For ID=0 To 0
    For a=0 To 1
      AddGadgetItem (ID, -1, "Normal Item "+Str(a))  ; if you want to add an image, use UseImage(x) as 4th parameter
      AddGadgetItem (ID, -1, "Node "+Str(a))
      OpenTreeGadgetNode(ID)
        AddGadgetItem(ID, -1, "Sub-Item 1")
        AddGadgetItem(ID, -1, "Sub-Item 2")
      CloseTreeGadgetNode(ID)
      AddGadgetItem (ID, -1, "File "+Str(a))
    Next
  Next
  Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf
; ExecutableFormat=Windows
; EOF
now, can from do a second program , how can take listtree from above
program (after it is running) ?
(output :
normal item 0
Node 0 (sub-item 1,sub-item 2)
file 0
...

thanks