phoenix_title wx.propgrid.PropertyGridPopulator

Allows populating wx.propgrid.PropertyGrid from arbitrary text source.


class_hierarchy Class Hierarchy

Inheritance diagram for class PropertyGridPopulator:

method_summary Methods Summary

__init__

Default constructor.

Add

Appends a new property under bottommost parent.

AddAttribute

Adds attribute to the bottommost property.

AddChildren

Pushes property to the back of parent array (ie it becomes bottommost parent), and starts scanning/adding children for it.

DoScanForChildren

Called once in AddChildren.

GetCurParent

Returns id of parent property for which children can currently be added.

GetState

ParseChoices

Parses strings of format “choice1”[=value1] …

ProcessError

Implement in derived class to do custom process when an error occurs.

SetGrid

SetState

ToLongPCT

Like String.ToLong , except allows N% in addition of N.


property_summary Properties Summary

CurParent

See GetCurParent

State

See GetState and SetState


api Class API

class wx.propgrid.PropertyGridPopulator(object)

Possible constructors:

PropertyGridPopulator()

Allows populating PropertyGrid from arbitrary text source.


Methods

__init__(self)

Default constructor.



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:

wx.propgrid.PGProperty



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



DoScanForChildren(self)

Called once in AddChildren.



GetCurParent(self)

Returns id of parent property for which children can currently be added.

Return type:

wx.propgrid.PGProperty



GetState(self)
Return type:

wx.propgrid.PropertyGridPageState



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:

wx.propgrid.PGChoices



ProcessError(self, msg)

Implement in derived class to do custom process when an error occurs.

Default implementation uses LogError.

Parameters:

msg (string) –



SetGrid(self, pg)
Parameters:

pg (wx.propgrid.PropertyGrid) –



SetState(self, state)
Parameters:

state (wx.propgrid.PropertyGridPageState) –



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



State

See GetState and SetState