08-26-2008 08:03 AM
Hi,
I have about thirty front panel buttopn controls on my user interface. They are all very spread out so I cannot put them all into a cluster. I have created a reference for each one and put them into an array. Each one of the buttons when pressed I want to trigger the exact same event on an event structure, but dont want to have to create 30 duplicate event cases for each button? any ideas how I can group them so that they trigger the same case?
regards
08-26-2008 08:06 AM - edited 08-26-2008 08:06 AM
Hi Develop-i...,
use dynamic event registration. Connect your array of control references to the "Register For Events" node and the resulting "Event Registration Refnum" to your Event Structure, there you can then select your user event.
Mike
08-26-2008 08:18 AM
Mike is right, dynamic events are the way to go.
See here I wrote a little nugget on this topic.
Ton
08-26-2008 09:59 AM
08-26-2008 10:16 AM
Hi Develop-i...,
maybe there is another way, but this also works.
Mike
08-26-2008 10:45 AM - edited 08-26-2008 10:48 AM
Mike is right, the label of the event is taken from the label of the wire, typecasting this gives you the ability to rename.
Here's the code for anyone interested:
Ton