Game Development Community

Elements not visible within GuiTreeViewCtrl

by Charlie Barkley · in Torque 3D Beginner · 07/13/2016 (11:44 am) · 1 replies

Hey guys,

I just played around a bit with Gui Controls and now used the "GuiTreeViewCtrl" which seems best for my XML Editor GUI I try to create. Using this Container Control was okay while adding buttons and Text Labels (Controls).
But when I call the API of the GuiTreeViewCtrl for inserting an item

XmlEditorGui.insertItem(0, "FirstItem", "100");

The item gets inserted which I evaluated with some echoes and calling "getItemValue(1)" function but I do not see any elements in the Gui itself like the adding of buttons etc did.
I'm sure I'm missing something here. Can you guys tell me what little trick I need to do to actually see that tree structure?

EDIT: I thought about hooking onto the event for adding an item and then dynamically add a GuiTextCtrl with the values of that added field - but I could not find an event for the adding of an item, only one for removing - Also I'm not even sure if theres a way to dynamically add new objects to a existing one, like I want to do it by adding the GuiTextCtrl on event triggering.


Greets Charlie!

#1
07/13/2016 (4:57 pm)
Mr. Barkley , again , excuse me , this is above me and Im just curious . Perhaps you can try obj.listobjects() and be sure it has been added to the tree . where obj is the name or id of the parent gui . it also occurs to me that the treeviewctrl is a bit like the file object , neither with which I should claim any expertise :).