diplomat.wx_gui.labeler_lib.FloatSpin¶
- class diplomat.wx_gui.labeler_lib.FloatSpin(minimum: float = None, maximum: float = None, default: float = None, increment: float = 1, digits: int = -1, **kwargs)[source]¶
Bases:
SettingWidgetA setting which displays a spin control for the user to interact with. Can handle any floating point values, both bounded and unbounded.
- __init__(minimum: float = None, maximum: float = None, default: float = None, increment: float = 1, digits: int = -1, **kwargs)[source]¶
Create a new floating point spinner setting.
- Parameters:
minimum – Minimum value of the spinner, or None if unbounded.
maximum – Maximum value of the spinner, or None if unbounded.
default – The default value. If None, uses the minimum if it is not None, otherwise the maximum if it is not None, and otherwise 0.
increment – The value the change the spin box by when one of the increment buttons is clicked, defaults to 1
digits – The number of decimal places to resolve numbers to. Defaults to -1 or the maximum possible number of decimal places.
Methods
__init__([minimum, maximum, default, ...])Create a new floating point spinner setting.
get_new_widget([parent])Get a widget capable of changing this setting.
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.