Version: 2.9.4
Public Member Functions
wxPropertyGridEvent Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/propgrid/propgrid.h>

Inheritance diagram for wxPropertyGridEvent:

Detailed Description

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

Library:  wxPropertyGrid
Category:  wxPropertyGrid

Public Member Functions

 wxPropertyGridEvent (wxEventType commandType=0, int id=0)
 Constructor.
 wxPropertyGridEvent (const wxPropertyGridEvent &event)
 Copy constructor.
 ~wxPropertyGridEvent ()
 Destructor.
bool CanVeto () const
 Returns true if you can veto the action that the event is signaling.
unsigned int GetColumn () const
 Returns the column index associated with this event.
wxPGPropertyGetMainParent () const
 Returns highest level non-category, non-root parent of property for which event occurred.
wxPGPropertyGetProperty () const
 Returns property associated with this event.
wxPGVFBFlags GetValidationFailureBehavior () const
 Returns current validation failure flags.
wxString GetPropertyName () const
 Returns name of the associated property.
wxVariant GetPropertyValue () const wxVariant GetValue() const
 Returns value of the associated property.
void SetCanVeto (bool canVeto)
 Set if event can be vetoed.
void SetProperty (wxPGProperty *p)
 Changes the property associated with this event.
void SetValidationFailureBehavior (wxPGVFBFlags flags)
 Set override validation failure behaviour.
void SetValidationFailureMessage (const wxString &message)
 Sets custom failure message for this time only.
void Veto (bool veto=true)
 Call this from your event handler to veto action that the event is signaling.
bool WasVetoed () const
 Returns true if event was vetoed.

List of all members.


Constructor & Destructor Documentation

wxPropertyGridEvent::wxPropertyGridEvent ( wxEventType  commandType = 0,
int  id = 0 
)

Constructor.

wxPropertyGridEvent::wxPropertyGridEvent ( const wxPropertyGridEvent event)

Copy constructor.

wxPropertyGridEvent::~wxPropertyGridEvent ( )

Destructor.


Member Function Documentation

bool wxPropertyGridEvent::CanVeto ( ) const

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

unsigned int wxPropertyGridEvent::GetColumn ( ) const

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

wxPGProperty* wxPropertyGridEvent::GetMainParent ( ) const

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

Useful when you have nested properties with children.

注意:
If immediate parent is root or category, this will return the property itself.
wxPGProperty* wxPropertyGridEvent::GetProperty ( ) const

Returns property associated with this event.

注意:
You should assume that this property can always be NULL. For instance, wxEVT_PG_SELECTED is emitted not only when a new property is selected, but also when selection is cleared by user activity.
wxString wxPropertyGridEvent::GetPropertyName ( ) const

Returns name of the associated property.

注意:
Property name is stored in event, so it remains accessible even after the associated property or the property grid has been deleted.
wxVariant wxPropertyGridEvent::GetPropertyValue ( ) const

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.

注意:
Property value is stored in event, so it remains accessible even after the associated property or the property grid has been deleted.
参照:
GetPropertyValue()
wxPGVFBFlags wxPropertyGridEvent::GetValidationFailureBehavior ( ) const

Returns current validation failure flags.

void wxPropertyGridEvent::SetCanVeto ( bool  canVeto)

Set if event can be vetoed.

void wxPropertyGridEvent::SetProperty ( wxPGProperty p)

Changes the property associated with this event.

void wxPropertyGridEvent::SetValidationFailureBehavior ( wxPGVFBFlags  flags)

Set override validation failure behaviour.

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

void wxPropertyGridEvent::SetValidationFailureMessage ( const wxString message)

Sets custom failure message for this time only.

Only applies if wxPG_VFB_SHOW_MESSAGE is set in validation failure flags.

void wxPropertyGridEvent::Veto ( bool  veto = true)

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

You can only veto a shutdown if wxPropertyGridEvent::CanVeto() returns true.

注意:
Currently only wxEVT_PG_CHANGING supports vetoing.
bool wxPropertyGridEvent::WasVetoed ( ) const

Returns true if event was vetoed.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines