07-29-2011 08:44 AM
Simple straight forward question. How can I trigger an event from a scale change on a progress bar. I've tried everything I could think of. What I am trying to accomplish is the following: I have 2 barmeters side by side. One is used as normal with the scale visible. The other's scale is hidden and is used to show the Hi Hi, Hi, Lo Lo, Lo. As the scale on one gets resized, the other must change in size accordingly. The idea is that the progress bar will change colours as it crosses the lines. The customer wants to be able to change the scale to zoom in and out. It works in a loop but flickers and is not a very conservative way to do it. I am not quite finished with the side labeling (verticle positioning of Hi and Lo) but everything else works.
Thanks
Matt
07-29-2011 11:09 AM - edited 07-29-2011 11:09 AM
All your property node writes belong inside cases so they only execute if the input value actually changes. No need to write the same properties over and over. (To see if a value has changed, use a feedback node and compare current to previous).
07-29-2011 11:16 AM
Ya but I really want to trigger an event when the scale is modified. How do I do this? Note: this code is a part of a very large program. If I could, I would rather execute the code in an event structure so it will fit into my existing architecture. I realize there are may ways to do this. If you don't know how to trigger an event based on a scale change then I hopefully someone else does.
07-29-2011 03:43 PM
There are no events associated with the scale.
Perhaps you could use a customized color ramp; such as in the attached VI.