LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

numeric control with increment/drecement buttons

hi - i'm trying to limit the ability to type a number into a numeric control. i want the following option to be controlled by a second Boolean button input:

 

if the boolean button TRUE, i want the numerical control on the front panel to allow the user to type in a value OR use the increments/decrement buttons

 

if the boolean is false, i want the numerical control to only allow the user to change the value via the increment/decrement buttons and NOT be able to enter a value directly to the numeric control.

 

this is similar to using a property node to disable the numeric control, but i only want to disable the ability to type in the value, not disable the increment/decrement buttons...

 

any thoughts?

 

 

0 Kudos
Message 1 of 5
(3,591 Views)
Two options:
- using the boolean you place a transparent element over the numeric input, so it blocks direct access. You need to disable tabbing as well...
- use your own incr/decr buttons so you can disable the numeric input.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,574 Views)

You can always make you own and with your own logic (e.g. make the increment/decrement seperate buttons and hide the original ones or even wrap it all into an xcontrol.

0 Kudos
Message 3 of 5
(3,570 Views)

thanks for replying.  i was thinking something along these lines as a brute force way, but just wanted to see if i was missing a feature in the numerical control properties.  i will pursue this...  thanks again....

0 Kudos
Message 4 of 5
(3,532 Views)

could build an xcontrol for this as well, with a property that you can simply turn on and off the the numeric input.  The X-Control will hide the transparent element blocking numericentry, you can then reuse it in your UI as a standard replacement for any numeric input, but with an additional property to control its numeric input True/False.

0 Kudos
Message 5 of 5
(3,493 Views)