Instantiates editor controls. |
|
Draws value for given property. |
|
Returns pointer to the name of the editor. |
|
Returns value from control, via parameter variant. |
|
Handles events. |
|
Sets control’s value specifically from int (applies to choice etc.). |
|
Sets value in control to unspecified. |
|
Loads value from property to the control. |
See |
wx.propgrid.
PGCheckBoxEditor
(PGEditor)¶Possible constructors:
PGCheckBoxEditor()
__init__
(self)¶CreateControls
(self, propgrid, property, pos, size)¶Instantiates editor controls.
propgrid (wx.propgrid.PropertyGrid) – wx.propgrid.PropertyGrid to which the property belongs (use as parent for control).
property (wx.propgrid.PGProperty) – Property for which this method is called.
pos (wx.Point) – Position, inside wx.propgrid.PropertyGrid, to create control(s) to.
size (wx.Size) – Initial size for control(s).
Note
It is not necessary to call wx.EvtHandler.Bind
for interesting editor events. All events from controls are automatically forwarded to wx.propgrid.PGEditor.OnEvent
and wx.propgrid.PGProperty.OnEvent
.
DrawValue
(self, dc, rect, property, text)¶Draws value for given property.
dc (wx.DC) –
rect (wx.Rect) –
property (wx.propgrid.PGProperty) –
text (string) –
GetName
(self)¶Returns pointer to the name of the editor.
For example, PGEditor_TextCtrl has name “TextCtrl”. If you don’t need to access your custom editor by string name, then you do not need to implement this function.
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.
variant (PGVariant) –
property (wx.propgrid.PGProperty) –
ctrl (wx.Window) –
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).
propgrid (wx.propgrid.PropertyGrid) –
property (wx.propgrid.PGProperty) –
wnd_primary (wx.Window) –
event (wx.Event) –
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 (i.e. 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.).
property (wx.propgrid.PGProperty) –
ctrl (wx.Window) –
value (int) –
SetValueToUnspecified
(self, property, ctrl)¶Sets value in control to unspecified.
property (wx.propgrid.PGProperty) –
ctrl (wx.Window) –
UpdateControl
(self, property, ctrl)¶Loads value from property to the control.
property (wx.propgrid.PGProperty) –
ctrl (wx.Window) –