phoenix_title wx.propgrid.NumericProperty

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.


class_hierarchy Class Hierarchy

Inheritance diagram for class NumericProperty:

method_summary Methods Summary

AddSpinStepValue

Returns what would be the new value of the property after adding SpinCtrl editor step to the current value.

DoSetAttribute

Reimplement this member function to add special handling for attributes of this property.

UseSpinMotion

Return True if value can be changed with SpinCtrl editor by moving the mouse.

__init__

Constructor is protected because wx.propgrid.NumericProperty is only a base class for other numeric property classes.


api Class API

class 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.


Methods

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.

Parameters

stepScale (long) – SpinCtrl editor step is first multiplied by this factor and next added to the current value.

Return type

PGVariant

Returns

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.

Parameters
  • name (string) –

  • value (PGVariant) –

Return type

bool

Returns

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.

Return type

bool



__init__(self, label, name)

Constructor is protected because wx.propgrid.NumericProperty is only a base class for other numeric property classes.

Parameters
  • label (string) –

  • name (string) –