Jump to content

Update slider while dragging


Recommended Posts

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?

Link to comment

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.

Link to comment

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.

Link to comment

"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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.