Phoenix Logo

phoenix_title wx.propgrid.PropertyGridEvent

A property grid event holds information about events associated with wx.propgrid.PropertyGrid objects.


class_hierarchy Class Hierarchy

Inheritance diagram for class PropertyGridEvent:


method_summary Methods Summary

__init__ Constructor.
CanVeto Returns True if you can veto the action that the event is signaling.
GetColumn Returns the column index associated with this event.
GetMainParent Returns highest level non-category, non-root parent of property for which event occurred.
GetProperty Returns property associated with this event.
GetPropertyName Returns name of the associated property.
GetPropertyValue Returns value of the associated property.
GetValidationFailureBehavior Returns current validation failure flags.
SetCanVeto Set if event can be vetoed.
SetProperty Changes the property associated with this event.
SetValidationFailureBehavior Set override validation failure behaviour.
SetValidationFailureMessage Sets custom failure message for this time only.
Veto Call this from your event handler to veto action that the event is signaling.
WasVetoed Returns True if event was vetoed.

api Class API



class wx.propgrid.PropertyGridEvent(CommandEvent)

Possible constructors:

PropertyGridEvent(commandType=0, id=0)

PropertyGridEvent(event)

A property grid event holds information about events associated with PropertyGrid objects.


Methods



__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self, commandType=0, id=0)

Constructor.

Parameters:
  • commandType (wx.EventType) –
  • id (int) –



__init__ (self, event)

Copy constructor.

Parameters:event (wx.propgrid.PropertyGridEvent) –





CanVeto(self)

Returns True if you can veto the action that the event is signaling.

Return type:bool


GetColumn(self)

Returns the column index associated with this event.

For the column dragging events, it is the column to the left of the splitter being dragged

Return type:int


GetMainParent(self)

Returns highest level non-category, non-root parent of property for which event occurred.

Useful when you have nested properties with children.

Return type: wx.propgrid.PGProperty

Note

If immediate parent is root or category, this will return the property itself.



GetProperty(self)

Returns property associated with this event.

Return type: wx.propgrid.PGProperty

Note

You should assume that this property can always be None. For instance, wxEVT_PG_SELECTED is emitted not only when a new property is selected, but also when selection is cleared by user activity.



GetPropertyName(self)

Returns name of the associated property.

Return type:string

Note

Property name is stored in event, so it remains accessible even after the associated property or the property grid has been deleted.



GetPropertyValue(self)

Returns value of the associated property.

Works for all event types, but for wxEVT_PG_CHANGING this member function returns the value that is pending, so you can call Veto if the value is not satisfactory.

Return type:PGVariant

Note

Property value is stored in event, so it remains accessible even after the associated property or the property grid has been deleted.

See also

GetPropertyValue



GetValidationFailureBehavior(self)

Returns current validation failure flags.

Return type:wx.propgrid.PGVFBFlags


SetCanVeto(self, canVeto)

Set if event can be vetoed.

Parameters:canVeto (bool) –


SetProperty(self, p)

Changes the property associated with this event.

Parameters:p (wx.propgrid.PGProperty) –


SetValidationFailureBehavior(self, flags)

Set override validation failure behaviour.

Only effective if Veto was also called, and only allowed if event type is wxEVT_PG_CHANGING .

Parameters:flags (wx.propgrid.PGVFBFlags) –


SetValidationFailureMessage(self, message)

Sets custom failure message for this time only.

Only applies if wx.propgrid.PG_VFB_SHOW_MESSAGE is set in validation failure flags.

Parameters:message (string) –


Veto(self, veto=True)

Call this from your event handler to veto action that the event is signaling.

You can only veto a shutdown if wx.propgrid.PropertyGridEvent.CanVeto returns True.

Parameters:veto (bool) –

Note

Currently only wxEVT_PG_CHANGING supports vetoing.



WasVetoed(self)

Returns True if event was vetoed.

Return type:bool

Properties



Column

See GetColumn



MainParent

See GetMainParent



Property

See GetProperty and SetProperty



PropertyName

See GetPropertyName



PropertyValue

See GetPropertyValue



ValidationFailureBehavior

See GetValidationFailureBehavior and SetValidationFailureBehavior