kirsten_tunsten Posted December 13, 2010 Report Share Posted December 13, 2010 Hello, A quick question: Does anybody know a simple workaround to create a slider that continuously updates its value while the needle is being dragged. (about the same functionality as "Update value while typing" for strings) Thanks! Kirsten. Quote Link to comment
jgcode Posted December 13, 2010 Report Share Posted December 13, 2010 Does anybody know a simple workaround to create a slider that continuously updates its value while the needle is being dragged. (about the same functionality as "Update value while typing" for strings) Hi Kirsten Continuous updates is the default behavior of a slider (the VI is not even running): <object id="scPlayer" class="embeddedObject" width="302" height="249" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LabVIEW/media/a4c9d65b-cb53-4c97-9179-4e4f37f1acd7/jingswfplayer.swf"> <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LabVIEW/media/a4c9d65b-cb53-4c97-9179-4e4f37f1acd7/jingswfplayer.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#FFFFFF"> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LabVIEW/media/a4c9d65b-cb53-4c97-9179-4e4f37f1acd7/FirstFrame.jpg&containerwidth=302&containerheight=249&content=http://content.screencast.com/users/jgcode/folders/LabVIEW/media/a4c9d65b-cb53-4c97-9179-4e4f37f1acd7/Update%20Slider.swf&blurover=false"> <param name="allowFullScreen" value="true"> <param name="scale" value="showall"> <param name="allowScriptAccess" value="always"> <param name="base" value="http://content.screencast.com/users/jgcode/folders/LabVIEW/media/a4c9d65b-cb53-4c97-9179-4e4f37f1acd7/"> Unable to display content. Adobe Flash is required. </object> What are you seeing? Quote Link to comment
kirsten_tunsten Posted December 13, 2010 Author Report Share Posted December 13, 2010 I'm sorry - I didn't ask it properly... While the VI is running I would like to receive new values (i.e. via value change event) while the value of a slider is being changed, but the change is not yet committed by releasing the slider. So, in short, I would like to receive the intermediate values so that I can take the necessary actions based on these intermediate values. Again, sorry for the confusion and thanks for the help. Bye for now, Kirsten. Quote Link to comment
hooovahh Posted December 13, 2010 Report Share Posted December 13, 2010 I'm sorry - I didn't ask it properly... While the VI is running I would like to receive new values (i.e. via value change event) while the value of a slider is being changed, but the change is not yet committed by releasing the slider. So, in short, I would like to receive the intermediate values so that I can take the necessary actions based on these intermediate values. Again, sorry for the confusion and thanks for the help. Bye for now, Kirsten. This is also the normal way that the vertical slider works. As a test I made a while loop, and in it a event structure with just one event which is value change on a vertical scrollbar. I then wired a indicator on the NewValue terminal in the event structure. I then ran the VI and moved the slider. As it moved (but wasn't released) the new value changed indicating that numerous events were being fired. I'm guessing there is something going on with your code that keeps it in the event structure not finishing. You might want to post a part of your code, or try to simplify it to find the problem. Quote Link to comment
asbo Posted December 13, 2010 Report Share Posted December 13, 2010 I'm guessing there is something going on with your code that keeps it in the event structure not finishing. You might want to post a part of your code, or try to simplify it to find the problem. "Lock front panel until this case completes", perhaps? Quote Link to comment
hooovahh Posted December 13, 2010 Report Share Posted December 13, 2010 "Lock front panel until this case completes", perhaps? I thought about that too, but if that were the case then the operator would use the slider and it would move one position the lock the UI (because it was doing stuff in the event structure like wait for mouse up) then they would have to let go of the mouse button and they could then move one more position. I didn't suggest the lock UI option, because it sounds like it works like normal moving up and down, only that it sounds like an event isn't fired until the mouse moves up. Quote Link to comment
kirsten_tunsten Posted December 13, 2010 Author Report Share Posted December 13, 2010 Thanks all - the problem is resolved now. There was some locking happening. I tried simplifying the code and then noticed where it went wrong. Again, thanks a million for your patience and helpfull hints! It really helped me to find the solution for this problem. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.