How can I bring certain gadgets to the front?

Blitz3D Forums/Blitz3D Programming/How can I bring certain gadgets to the front?

every gadget in my User interface (be it the buttons, actual window or title bar) are stored in a type.I can move them all around with the mouse but they order is wrong. some objects will go behind others..

buttons are generally parented to the window gadget.

My question is: WHen i click on the main titlebar (to which the main window is parented) how can i bring the entire group forward?

Object heirarchy: (sp) from top

Titlebar>Window>Buttons

I cant seem to get it to work with EntityOrder. (simply entityorder entity,-1 still ends up with incorrect results)

is there a technique to say, iterate through all the gadgets and find the connected gadgets, and order them correctly? Any examples would be great as im unsure im doing things right...


Cheers...