phoenix_title wx.propgrid.PGTextCtrlEditor


class_hierarchy Class Hierarchy

Inheritance diagram for class PGTextCtrlEditor:

sub_classes Known Subclasses

wx.propgrid.PGSpinCtrlEditor, wx.propgrid.PGTextCtrlAndButtonEditor


method_summary Methods Summary

__init__

CreateControls

Instantiates editor controls.

GetName

Returns pointer to the name of the editor.

GetTextCtrlValueFromControl

GetValueFromControl

Returns value from control, via parameter ‘variant’.

OnEvent

Handles events.

OnFocus

Extra processing when control gains focus.

OnTextCtrlEvent

SetControlStringValue

Sets control’s value specifically from string.

UpdateControl

Loads value from property to the control.


property_summary Properties Summary

Name

See GetName


api Class API

class wx.propgrid.PGTextCtrlEditor(PGEditor)

Possible constructors:

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

Instantiates editor controls.

Parameters
Return type

wx.propgrid.PGWindowList

Note

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

static GetTextCtrlValueFromControl(variant, property, ctrl)
Parameters
Return type

bool

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

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

OnFocus(self, property, wnd)

Extra processing when control gains focus.

For example, wx.TextCtrl based controls should select all text.

Parameters
static OnTextCtrlEvent(propgrid, property, ctrl, event)
Parameters
Return type

bool

SetControlStringValue(self, property, ctrl, txt)

Sets control’s value specifically from string.

Parameters
UpdateControl(self, property, ctrl)

Loads value from property to the control.

Parameters
Name

See GetName