This is an abstract class which serves as a base class for numeric properties, like wx.propgrid.IntProperty, wx.propgrid.UIntProperty, wx.propgrid.FloatProperty.
Supported special attributes:
PG_ATTR_MIN
, PG_ATTR_MAX
: Specify acceptable value range.
PG_ATTR_SPINCTRL_STEP
: How much number changes when SpinCtrl editor button is pressed (or up/down on keyboard).
PG_ATTR_SPINCTRL_WRAP
: Specify if value modified with SpinCtrl editor wraps at Min/Max.
PG_ATTR_SPINCTRL_MOTION
: Specify if value can also by changed with SpinCtrl editor by moving mouse when left mouse button is being pressed.
New in version 4.1/wxWidgets-3.1.3.
wx.propgrid.FloatProperty, wx.propgrid.IntProperty, wx.propgrid.UIntProperty
Returns what would be the new value of the property after adding SpinCtrl editor step to the current value. |
|
Reimplement this member function to add special handling for attributes of this property. |
|
Return |
|
Constructor is protected because wx.propgrid.NumericProperty is only a base class for other numeric property classes. |
wx.propgrid.
NumericProperty
(PGProperty)¶Possible constructors:
NumericProperty(label, name)
This is an abstract class which serves as a base class for numeric properties, like IntProperty, UIntProperty, FloatProperty.
AddSpinStepValue
(self, stepScale)¶Returns what would be the new value of the property after adding SpinCtrl editor step to the current value.
Current value range and wrapping (if enabled) are taken into account. This member has to be implemented in derived properties.
stepScale (long) – SpinCtrl editor step is first multiplied by this factor and next added to the current value.
PGVariant
Value which property would have after adding SpinCtrl editor step.
Note
Current property value is not changed.
DoSetAttribute
(self, name, value)¶Reimplement this member function to add special handling for attributes of this property.
name (string) –
value (PGVariant) –
bool
Return False
to have the attribute automatically stored in m_attributes. Default implementation simply does that and nothing else.
Note
To actually set property attribute values from the application, use wx.propgrid.PGProperty.SetAttribute
instead.
UseSpinMotion
(self)¶Return True
if value can be changed with SpinCtrl editor by moving the mouse.
bool
__init__
(self, label, name)¶Constructor is protected because wx.propgrid.NumericProperty is only a base class for other numeric property classes.
label (string) –
name (string) –