Phoenix Logo

phoenix_title wx.propgrid.PGChoiceEditor


class_hierarchy Class Hierarchy

Inheritance diagram for class PGChoiceEditor:

method_summary Methods Summary

__init__  
CanContainCustomImage Returns True if control itself can contain the custom image.
CreateControls Instantiates editor controls.
CreateControlsBase  
DeleteItem Deletes item from existing control.
GetName Returns pointer to the name of the editor.
GetValueFromControl Returns value from control, via parameter ‘variant’.
InsertItem Inserts item to existing control.
OnEvent Handles events.
SetControlIntValue Sets control’s value specifically from int (applies to choice etc.).
SetControlStringValue Sets control’s value specifically from string.
SetValueToUnspecified Sets value in control to unspecified.
UpdateControl Loads value from property to the control.

property_summary Properties Summary

Name See GetName

api Class API



class wx.propgrid.PGChoiceEditor(PGEditor)

Possible constructors:

PGChoiceEditor()

Methods



__init__(self)


CanContainCustomImage(self)

Returns True if control itself can contain the custom image.

Default implementation returns False.

Return type:bool


CreateControls(self, propgrid, property, pos, size)

Instantiates editor controls.

Parameters:
Return type:

wx.propgrid.PGWindowList

Note



CreateControlsBase(self, propgrid, property, pos, sz, extraStyle)
Parameters:
Return type:

Window



DeleteItem(self, ctrl, index)

Deletes item from existing control.

Default implementation does nothing.

Parameters:


GetName(self)

Returns pointer to the name of the editor.

For example, PGEditor_TextCtrl has name “TextCtrl”. If you dont’ need to access your custom editor by string name, then you do not need to implement this function.

Return type:string


GetValueFromControl(self, variant, property, ctrl)

Returns value from control, via parameter ‘variant’.

Usually ends up calling property’s StringToValue() or IntToValue(). Returns True if value was different.

Parameters:
Return type:

bool



InsertItem(self, ctrl, label, index)

Inserts item to existing control.

Index -1 means end of list. Default implementation does nothing. Returns index of item added.

Parameters:
  • ctrl (wx.Window) –
  • label (string) –
  • index (int) –
Return type:

int



OnEvent(self, propgrid, property, wnd_primary, event)

Handles events.

Returns True if value in control was modified (see wx.propgrid.PGProperty.OnEvent for more information).

Parameters:
Return type:

bool

Note

wx.propgrid.PropertyGrid will automatically unfocus the editor when wxEVT_TEXT_ENTER is received and when it results in property value being modified. This happens regardless of editor type (ie. behaviour is same for any wx.TextCtrl and wx.ComboBox based editor).



SetControlIntValue(self, property, ctrl, value)

Sets control’s value specifically from int (applies to choice etc.).

Parameters:


SetControlStringValue(self, property, ctrl, txt)

Sets control’s value specifically from string.

Parameters:


SetValueToUnspecified(self, property, ctrl)

Sets value in control to unspecified.

Parameters:


UpdateControl(self, property, ctrl)

Loads value from property to the control.

Parameters:

Properties



Name

See GetName