diplomat.wx_gui.labeler_lib.Slider

class diplomat.wx_gui.labeler_lib.Slider(minimum: int, maximum: int, default: int = None, style: int = 0, **kwargs)[source]

Bases: SettingWidget

A setting which displays a slider for the user to interact with. Allows the user to select over a range of integers.

__init__(minimum: int, maximum: int, default: int = None, style: int = 0, **kwargs)[source]

Create a new slider setting.

Parameters:
  • minimum – An integer, the minimum value of the slider.

  • maximum – An integer, the maximum bound of the slider.

  • default – An optional integer, the initial value of the slider. If None, the default value is the minimum value of the slider.

  • style – A wxWidgets style flag (integer), adjust the style of the slider as displayed in the UI.

Methods

__init__(minimum, maximum[, default, style])

Create a new slider setting.

get_new_widget([parent])

Get a widget capable of changing this setting.

get_value()

Get the current value of this setting.

set_hook(hook)

Set the hook function for this setting, this is called whenever the setting is changed.

get_new_widget(parent=None) wx.Control[source]

Get a widget capable of changing this setting.

Parameters:

parent – The parent container this wxWidget will be placed in.

Returns:

A wx.Control, to be used to update this setting in the user interface.

get_value() int[source]

Get the current value of this setting.

Returns:

Any, the current set value of this setting as based on the wx control.

set_hook(hook: Callable[[Any], None])[source]

Set the hook function for this setting, this is called whenever the setting is changed.