wx.propgrid.EditEnumProperty¶wx.propgrid.EnumProperty with String value and writable combo box editor.
Note
Uses int value, similar to wx.propgrid.EnumProperty, unless text entered by user is not in choices (in which case string value is used).
Class Hierarchy¶
Inheritance diagram for class EditEnumProperty:
Methods Summary¶This virtual function is called after m_value has been set. |
|
Converts text into Variant value appropriate for this property. |
|
Implement this function in derived class to check the value. |
Class API¶Possible constructors:
EditEnumProperty(label=PG_LABEL, name=PG_LABEL, labels=[], values=[],
value="") -> None
EditEnumProperty(label, name, choices, value="") -> None
EnumProperty with string value and writable combo box editor.
__init__ (self, label=PG_LABEL, name=PG_LABEL, labels=[], values=[], value=””)
label (string)
name (string)
labels (list of strings)
values (list of integers)
value (string)
None
__init__ (self, label, name, choices, value=””)
label (string)
name (string)
choices (wx.propgrid.PGChoices)
value (string)
None
This virtual function is called after m_value has been set.
None
Note
If m_value was set to Null variant (i.e. unspecified value), OnSetValue will not be called.
m_value may be of any variant type. Typically properties internally support only one variant type, and as such OnSetValue provides a good opportunity to convert supported values into internal type.
Default implementation does nothing.
Converts text into Variant value appropriate for this property.
text (string) – Text to be translated into variant.
flags (PGPropValFormatFlags) – If wx.propgrid.PGPropValFormatFlags.FullValue is set, returns complete, storable value instead of displayable one (they may be different). If wx.propgrid.PGPropValFormatFlags.CompositeFragment is set, text is interpreted as a part of composite property string value (as generated by ValueToString called with this same flag).
Tuple[bool, PGVariant]
You might want to take into account that m_value is Null variant if property value is unspecified (which is usually only case if you explicitly enabled that sort behaviour).
Returns True if resulting Variant value was different.
Note
Default implementation converts semicolon delimited tokens into child values. Only works for properties with children.
Implement this function in derived class to check the value.
Return True if it is ok. Returning False prevents property change events from occurring.
value (PGVariant)
validationInfo (wx.propgrid.PGValidationInfo)
bool
Note
Default implementation always returns True.