09-27-2010 06:07 PM
I'm trying to make the Z-scale max property of an Intensity graph more flexible to modify from the front panel. In the attached VI, I use an increment/decrement control and just detect a value change event (ignoring the value of the control). This works fine, although it is a bit of a kludge.
I'd like to make it more functional though. My main question is the following: How can I detect a "control-mouseclick" event? I plan to use this event to change the Intensity Graph max by a factor rather than by an additive value.
A second small question: On the numeric control, is there a way I can get rid of the displayed number whitespace and leave only the increment/decrement buttons?
Thanks,
Allan
Solved! Go to Solution.
09-27-2010 06:20 PM
Create a Mouse Down event case. Inside the case, unbundle PlatMods and get the value of Ctrl. This value will be True if the control button was held down while the mouse was clicked. See below:
09-27-2010 06:20 PM
Sorry, let me be a little clearer: By "control-mouseclick", I mean pressing on the increment/decrement buttons with the mouse while holding the control key down. Whether the event is detected as a mouseclick or a value change doesn't particularly matter to me.
09-27-2010 06:22 PM
Thanks...just saw your reply after I posted my clarification. I'll take a look and try it out.
09-27-2010 07:02 PM
Just pretend that the Stop button in my example is an increment or decrement button. It will work the same way.
09-27-2010 10:42 PM
tbob,
Thanks. Your suggesetion solves my original problem, but it creates another. With the platmods "ctrl" boolean hooked to a case statement, I can choose between those "ctrl click" and "regular click" cases. However, with the "mouse down" event, I can't tell if the increment or decrement button was pressed.
I guess one solution is to replace a single inc/dec control with two booleans controls (increase and decrease) and to have two separate events . Problem with that is that I'm really piling up event cases, because I'll need several copies of this type of control on my front panel.
Can you suggest any way to have both inc/dec button and ctrl-mouse functionality? Maybe there is a way to combine the "value change" and "mouse down" events?
Allan
09-28-2010 11:47 AM
Are you talking about the inc/dec button on a numeric control? I thought you had separate booleans for increment and decrement. This is tough. You can't get the PlatMods when using a Value Change event. You may have to make your own inc/dec controls and update a numeric indicator instead of using a numeric control.