Panda3D Manual: DirectSlider
  <<prev top next>>     

Use a DirectSlider to make a slider, a widget that allows the user to select a value between a bounded interval. DirectSlider is available beginning in Panda3D 1.1.

A DirectSlider consists of a long bar, by default horizontal, along with a "thumb", which is a special button that the user may move left or right along the bar. The normal DirectGui parameters such as frameSize, geom, and relief control the look of the bar; to control the look of the thumb, prefix each of these parameters with the prefix "thumb_", e.g. thumb_frameSize.

If you want to get (or modify) the current value of the slider (by default, the range is between 0 and 1), use mySlider['value'].

KeywordDefinitionValue
valueInitial value of the sliderDefault is 0
rangeThe (min, max) range of the sliderDefault is (0, 1)
pageSizeThe amount to jump the slider when the user clicks left or right of the thumbDefault is 0.1
orientationThe orientation of the sliderHORIZONTAL or VERTICAL
commandFunction called when the value of the slider changes (takes no arguments)Function
extraArgsExtra arguments to the function specified in command[Extra Arguments]
thumb_geom, thumb_relief, thumb_text, thumb_frameSize, etc.Parameters to control the look of the thumbAny parameters appropriate to DirectButton
  <<prev top next>>