Game Development Community

Get parent of a gui control?

by Todd D. Degani · in Torque Game Engine · 04/27/2005 (3:22 pm) · 2 replies

I am pretty new to using the gui but this seems to be a pretty simple question that I cannot locate the answer to. I am trying to figure out how to get the parent control of a gui control. GetParent doesnt work and I havent located the correct method yet to get this information. Does such a method already exist or is this something I am going to wrtie up myself.

#1
04/27/2005 (3:31 pm)
Try this, guicontrol.dump() where guicontrol is the name of the control you are looking for the parent of, then check your console log. That usually works when I need to find some method that isn't quite working the way I had hoped.
#2
04/28/2005 (7:22 am)
Ah yeah forgot about that. After some poking around it appears getGroup() will work for me. Bascially I needed the parent controls extents and it appears chatHud is doing something similar to that as well, so if its good enough for the chat hud its good enough for me :). Thanks.