Share

Slider

[Desktop Automation]

Notes: Units are always integer between min and max. More custom values must be derived from those separately.

Properties

Property Read/write Type Description
caption read/write string caption of the slider
captionspacing read/write number spacing of the caption in pixels
captionwidth read/write number width of the caption in pixels
captionwidthpercentage Read/write Number Width of the caption in percentage
enabled read/write Boolean Enable or disable the slider
height read/write number height of the slider in pixels
hint read/write string Hint or tooltip for the slider
max read/write number maximum value of the slider
onchange read/write string callback function for a change event
position read/write number position of the slider
spacing read/write number spacing of the slider in pixels
topspacing read/write number top spacing of the slider in pixels
translate read/write Boolean when true, caption must be a String Identifier
visible read/write Boolean Toggle visibility of the slider

Methods

None.

Back to top

Example

function SetupUI()
 GEditSlider = interface_main_frame:addedit()
 GEditSlider.caption = "Position"
 GEditSlider.translate = false
 GSlider = interface_main_frame:addslider()
 GSlider.caption = "Slider"
 GSlider.captionwidth = 120
 GSlider.min = 46
 GSlider.max = 93
 GSlider.position = 69
 GSlider.onchange = "SliderCallback"
 SliderCallback()
end

function SliderCallback()
 GEditSlider.text = "Position: " .. GSlider.position
end

Figure 1 - the result of the slider example code

Back to top

Was this information helpful?