From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-03-2012 04:58 AM - edited 04-03-2012 04:58 AM
Hello,
I'm using System Horizontal Pointer slide.
And I want to add slider programmatically. I know how to add this manuel but I want to add/delete sliders programmatically.
Could you please help me ?
Solved! Go to Solution.
04-03-2012 06:24 AM
With VI Scripting enabled (LV 2009 and higher, Options>VISever) there is a method named "Add Slider".
However, this method is only available when the VI is in Edit Mode.
Christian
04-03-2012 07:29 AM
So there is no way to do this right? 😕
04-03-2012 07:37 AM
Not during runtime.
What you can do without scripting is to manually add a maximum number of slides during edit time.
You can use property nodes "Active Slider" followed by "Slider Colors". Set the color to transparent. Maybe this is a workaround for your need.
Norbert
04-03-2012 07:43 AM
Why not simply use the property node "Visible". Set it to TRUE to see it and FALSE to hide it.
That way, you do not need to delete the object from the front panel.
Although not usually recommended, you can superimpose objects on the front panel so that it appears as if you replaced it with another one. Simply set the "Visible" property accordingly for both objects.
04-03-2012 07:52 AM
@Ray.R wrote:
Why not simply use the property node "Visible". Set it to TRUE to see it and FALSE to hide it.
That way, you do not need to delete the object from the front panel.
Although not usually recommended, you can superimpose objects on the front panel so that it appears as if you replaced it with another one. Simply set the "Visible" property accordingly for both objects.
There is no Visibility property for the Slider, just for the Frontpanel Object as a whole.
04-03-2012 08:29 AM
Yes thats right. If I do visible false, all object will dissappear.
04-03-2012 10:14 AM
OOps.. My bad..
I didn't realize that there would be multiple sliders and some would be removed...\
I guess the easiest approach is what Norbert suggested..
04-03-2012 10:22 AM
No_...
What is it that you are trying to accomplish? How will this be used? Perhaps someone can suggest an alternative which might be easier to accomplish or work better for your application.
What is the maximum number of sliders which would ever be required? It seems likely that more than 2 or 3 sliders begins to become quite confusing for the user, especially when they are set close to the same value.
Lynn
04-03-2012 03:42 PM
it will be unlimited or maybe willbe maximum 20. It is complicated when the number is unknown.