Allows populating wx.propgrid.PropertyGrid from arbitrary text source.
Default constructor. |
|
Appends a new property under bottommost parent. |
|
Adds attribute to the bottommost property. |
|
Pushes property to the back of parent array (ie it becomes bottommost parent), and starts scanning/adding children for it. |
|
Called once in AddChildren. |
|
Returns id of parent property for which children can currently be added. |
|
Parses strings of format “choice1”[=value1] … |
|
Implement in derived class to do custom process when an error occurs. |
|
Like |
See |
|
wx.propgrid.
PropertyGridPopulator
(object)¶Possible constructors:
PropertyGridPopulator()
Allows populating PropertyGrid from arbitrary text source.
__init__
(self)¶Default constructor.
Add
(self, propClass, propLabel, propName, propValue, pChoices=None)¶Appends a new property under bottommost parent.
propClass (string) – Property class as string.
propLabel (string) – Property label.
propName (string) – Property name.
propValue (string) – Property value.
pChoices (wx.propgrid.PGChoices) – Set of choices for the property (optional).
AddAttribute
(self, name, type, value)¶Adds attribute to the bottommost property.
name (string) – Attribute name.
type (string) – Allowed values: "string"
, (same as string), "int"
, "bool"
. Empty string means autodetect.
value (string) – Attribute value.
bool
AddChildren
(self, property)¶Pushes property to the back of parent array (ie it becomes bottommost parent), and starts scanning/adding children for it.
When finished, parent array is returned to the original state.
property (wx.propgrid.PGProperty) –
DoScanForChildren
(self)¶Called once in AddChildren.
GetCurParent
(self)¶Returns id of parent property for which children can currently be added.
GetState
(self)¶ParseChoices
(self, choicesString, idString)¶Parses strings of format “choice1”[=value1] …
“choiceN”[=valueN] into wx.propgrid.PGChoices. Registers parsed result using idString (if not empty). Also, if choices with given id already registered, then don’t parse but return those choices instead.
choicesString (string) –
idString (string) –
ProcessError
(self, msg)¶Implement in derived class to do custom process when an error occurs.
Default implementation uses LogError.
msg (string) –
SetGrid
(self, pg)¶pg (wx.propgrid.PropertyGrid) –
SetState
(self, state)¶state (wx.propgrid.PropertyGridPageState) –
ToLongPCT
(s, pval, max)¶Like String.ToLong
, except allows N% in addition of N.
s (string) –
pval (long) –
max (long) –
bool
CurParent
¶See GetCurParent