From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Integer )
aWebSlider.Value = newIntegerValue
IntegerValue = aWebSlider.Value

Supported for all project types and targets.

The current value of the Slider. The default is 0.


This code in the ValueChanged event handler fills a WebImageViewer with shades of red as the slider is moved. For best results you will also want to increase the Maximum of the slider to 255:

Var p As New Picture(ImageViewer1.Width, ImageViewer1.Height, 32)
p.Graphics.ForeColor = RGB(Me.Value, 0, 0)
p.Graphics.FillRect(0, 0, ImageViewer1.Width, ImageViewer1.Height)

ImageViewer1.Picture = p

This code sets the slider to the middle position:

Slider1.Value = (Slider1.Minimum + Slider1.Maximum) \ 2