? parent from eventsource()

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

Duckstab[o](Posted 2006) [#1]
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


REDi(Posted 2006) [#2]
Local Parent:TGadget = TGadget(EventSource()).Parent



Duckstab[o](Posted 2006) [#3]
Thanks papa works a treat

Happy coding M8 :)


REDi(Posted 2006) [#4]
My pleasure squire