NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
sinnas
Posts: 20
0 Kudos
Accepted Solution

increment or decrement arrow clicked on the numeric control?

is there a way to tell which arrow has been clicked by the user?

 

thanks

Active Participant
Wolfgang
Posts: 1,929
0 Kudos

Re: increment or decrement arrow clicked on the numeric control?

Only indirectly:

 

1) Read the value of the control

2) If the event EVENT_VAL_CHANGED occurred, read the value of the control again

3) The new value should be old_value +/- increment_value; from this change it is possible to derive the sign of the increment, i.e. positive or negative; this you can translate to up or down :smileyhappy:

 

Hth,

Wolfgang

Member
sinnas
Posts: 20
0 Kudos

Re: increment or decrement arrow clicked on the numeric control?

oh ok i thought i was missing a simpler way to do it.. Thank you wolfgang!

Active Participant
Wolfgang
Posts: 1,929
0 Kudos

Re: increment or decrement arrow clicked on the numeric control?

You're welcome.

 

Note however that the sketch of this indirect method is simplified because it may happen that an event EVENT_VAL_CHANGED is triggered while the numeric value has not changed at all! Hence you might consider supporting my suggestion for an improved behaviour of this event here.

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page