Slider (hwx.gui)¶
A Slider Widget.
The Slider is the classic widget for controlling a bounded value.
A Slider Widget displays a range of values from which a user selects a single value between a minimum and a maximum value.
Slider widgets are usually created to control discrete integer values such as the number of coils of a coil spring .
- Inherits:
Properties¶
Public Methods¶
addChildren (self, children)
destroy (self)
enableGlobalActions (self, enable)
getMousePosition (self)
getRelativeMousePosition (self)
hide (self)
saveAsPng (self, fname)
setF1HelpTopic (self, helptopic)
setProperties (self, kwds)
show (self)
Property Details¶
- property maxvalue¶
The maximum/right most value.
- property minvalue¶
The minimum/left most value.
- property pageStep¶
The larger of two steps a slider provides corresponding to the user pressing PageUp or PageDown.
- property tracking¶
Returns and sets if command will be called.
If True the command will be called while the slider is dragged, otherwise, it will only be called when the slider is released.
Method Details¶
- addChildren(self, children)¶
Add child widgets/layouts into this widget.
Widget children get layed out using a VBoxLayout.
Typically, you’ll pass the parent/children into the constructor instead of calling this function directly.
- param children
- type children
list[Widget] | Layout
- destroy(self)¶
Deletes this and all its children.
- enableGlobalActions(self, enable)¶
Sets the state of Global Actions.
Disable the global actions to get key events.
- param enable
Determines whether to enable or disable global actions.
- type enable
bool
- getMousePosition(self)¶
Returns the mouse position.
- getRelativeMousePosition(self)¶
Returns the mouse position relative to this widget.
- hide(self)¶
Hides the widget.
- saveAsPng(self, fname)¶
Saves the widget as a .png file.
- param fname
The file name for the .png
- type fname
str
- returns
True if it was saved succesfully, False otherwise.
- rtype
bool
- setF1HelpTopic(self, helptopic)¶
Popup web-browser helps when the user hits F1 when over this.
- param helptopic
Topic name user needs help in.
- type helptopic
str
- setProperties(self, kwds)¶
Internal method called from constructors.
- show(self)¶
Shows the widget.