? parent from eventsource()

BlitzMax Forums/BlitzMax Programming/? parent from eventsource()

How do you find the parent of eventsource()

I have My Main Window
5 panels connected to Window
and 5 Buttons Connected to each panel

Im Trying to use Select to activate a case but dont want to go over the 25 buttons every event.

using eventsource i wanted to find the parent panel and then check the five buttons connected

ie max of six Cases to find button
or
25 case to normal way any ideas welcome

might seems a lot of trouble for nothing but im planning on having 140-200 gadgets on screen ie buttons,text,combos,sliders split between 10 panels

Local Parent:TGadget = TGadget(EventSource()).Parent


Thanks papa works a treat

Happy coding M8 :)

My pleasure squire