wx.propgrid.PropertyGridPopulator¶
Allows populating wx.propgrid.PropertyGrid from arbitrary text source.
Class Hierarchy¶
Methods Summary¶
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 |
Properties Summary¶
See |
|
Class API¶
- class wx.propgrid.PropertyGridPopulator(object)¶
Possible constructors:
PropertyGridPopulator() -> None
Allows populating PropertyGrid from arbitrary text source.
Methods¶
- __init__(self)¶
Default constructor.
- Return type:
None
- Add(self, propClass, propLabel, propName, propValue, pChoices=None)¶
Appends a new property under bottommost parent.
- Parameters:
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).
- Return type:
- AddAttribute(self, name, type, value)¶
Adds attribute to the bottommost property.
- Parameters:
name (string) – Attribute name.
type (string) – Allowed values:
"string"
, (same as string),"int"
,"bool"
. Empty string means autodetect.value (string) – Attribute value.
- Return type:
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.
- Parameters:
property (wx.propgrid.PGProperty)
- Return type:
None
- DoScanForChildren(self)¶
Called once in AddChildren.
- Return type:
None
- GetCurParent(self)¶
Returns id of parent property for which children can currently be added.
- Return type:
- GetState(self)¶
- Return type:
- 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.
- Parameters:
choicesString (string)
idString (string)
- Return type:
- ProcessError(self, msg)¶
Implement in derived class to do custom process when an error occurs.
Default implementation uses LogError.
- Parameters:
msg (string)
- Return type:
None
- SetGrid(self, pg)¶
- Parameters:
- Return type:
None
- SetState(self, state)¶
- Parameters:
- Return type:
None
- static ToLongPCT(s, pval, max)¶
Like
String.ToLong
, except allows N% in addition of N.- Parameters:
s (string)
pval (long)
max (long)
- Return type:
bool
Properties¶
- CurParent¶
See
GetCurParent