10-28-2013 03:27 AM
Hi everyone,
I want to make a button to increase a slide value according to user's mouse operation:
1. the button pressed less than 0.5 s, the slide increase 1
2. the button pressed more than 0.5 s, the slide increase more
I have done the second function, but I don't know how to realise the first function.
Here is the vi. Please Note, I would like to keep the while loop run all the time.
I appreciated it if someone could help me. Thanks a lot.
Solved! Go to Solution.
10-28-2013 03:34 AM
10-28-2013 04:54 AM
Hi Gred,
Thanks for your kindly help.
I am sorry I did not describe the problem clear enough.
I hope I just press the 'X++' button for a short while, like 0.5 s (which means the 'Elapsed Time' indicator on the front panel is less than 0.5s), the program could consider that I just pressed the button only once, and then after this button is released, only 1 value add to slider.
Would you please help me, thanks again.
10-28-2013 05:03 AM
10-28-2013 05:47 AM
Hi Gerd,
Great job, thanks. The attached vi looks more closer to what I want.
Actually, I would like to make a button for the slider to instead of the slider's increasement/decreasement button.
Because the slider's increase/decrease button moves too slow when hold press, and the size is too small. So I used the 'X++' button to instead of them.
I really appreciated if more suggestions could give me for design the button.
Thanks a lot.
10-28-2013 05:58 AM
11-06-2013 10:09 PM
Yes, you are right, using event structure is a good way to solve this problem.
To help others, I attached a simple example, see attachments.
11-06-2013 10:12 PM
For Labview 8.0 version
11-06-2013 11:46 PM
Thanks for sharing cctt126!
You may also want to consider uploading your examples to the NI Developer Community here - the community is set up to share and provide feedback on example code and will make it easier for others to search for and locate your contribution.
Regards,