D doodooronron Member Licensed User May 5, 2021 #1 I need to change the minimum and maximum values of a slider under program control. I've had a good search but can't find how to do this. The slider is set up using the designer. Can anyone point me in the right direction?
I need to change the minimum and maximum values of a slider under program control. I've had a good search but can't find how to do this. The slider is set up using the designer. Can anyone point me in the right direction?
Semen Matusovskiy Well-Known Member Licensed User May 5, 2021 #2 Let's mySlider is a name of your control Code: Copy Dim no As NativeObject = mySlider no.SetField ("minimumValue", 50) no.SetField ("maximumValue", 100) Upvote 0
Let's mySlider is a name of your control Code: Copy Dim no As NativeObject = mySlider no.SetField ("minimumValue", 50) no.SetField ("maximumValue", 100)
D doodooronron Member Licensed User May 6, 2021 #3 Semen Matusovskiy said: Let's mySlider is a name of your control Code: Copy Dim no As NativeObject = mySlider no.SetField ("minimumValue", 50) no.SetField ("maximumValue", 100) Click to expand... Thanks, that looks like it's just what I need. However, when I try to run it, I get an error that the slider is not initialised. I presume that the format would be something like "no.Initialize(something, something......", but I'm struggling to get anything to work. Very basic, I know, but still tricky for a beginner. Upvote 0
Semen Matusovskiy said: Let's mySlider is a name of your control Code: Copy Dim no As NativeObject = mySlider no.SetField ("minimumValue", 50) no.SetField ("maximumValue", 100) Click to expand... Thanks, that looks like it's just what I need. However, when I try to run it, I get an error that the slider is not initialised. I presume that the format would be something like "no.Initialize(something, something......", but I'm struggling to get anything to work. Very basic, I know, but still tricky for a beginner.
Erel B4X founder Staff member Licensed User Longtime User May 6, 2021 #4 Code: Copy Slider1.MaximumValue = 100 Slider1.MinimumValue = 50 Upvote 0