From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-09-2010 12:51 PM
Hi,
I use an event structure. and I have 2 occurences of the same customized control. The customized control is a cluster of two controls.
Therefore I can monitor a value change of the controls in the event structure by looking at Occur1.Control1, Occur1.Control2, Occur2.Control1, and Occur2.Control2.
Now I use Occur1.Control1 and Occur2.Control1 to trigger an event.
Depending on the triggering occurence I would like to change the value of Control2 in the same occurance.
I.e., if Occur1.Control1 triggers the event -> change Occur1.Control2; if Occur2.Control1 triggers the event -> change Occur2.Control2.
How do I find out if Occur1 or Occur2 triggered the event?
When I take the CtrlRef from the data node in the event structure, it just tells me Control1, but not Occur1.Control1 or Occur2.Control1.
Thanks,
Dan
04-09-2010 12:57 PM
04-09-2010 01:07 PM
04-09-2010 01:08 PM - edited 04-09-2010 01:18 PM
Use a "Owner" property from the ref you get back from the event structure (this event is configure to fire on changes to a control inside of the cluster) and use "to More Specific" node to cast the owner ref as a cluster. Then use the "label.Test" of THAT ref (which is now point at the cluster holding your control).
Ben
04-09-2010 01:15 PM
04-09-2010 01:16 PM - edited 04-09-2010 01:18 PM
Use the property node for Owner, cast that to a control to get the label's text.
Ahh, the new knight just beat me!
04-09-2010 01:19 PM - edited 04-09-2010 01:20 PM
Another option. You could make two event cases.
04-09-2010 01:19 PM
Another option. You could make two event cases.
04-09-2010 01:21 PM
04-09-2010 01:22 PM