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() -> None

Allows populating PropertyGrid from arbitrary text source.


Methods

__init__(self)

Default constructor.

Return type:

None



Add(self, propClass: str, propLabel: str, propName: str, propValue: str, pChoices: PGChoices | None = 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: str, type: str, value: str)

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: PGProperty)

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:

wx.propgrid.PGProperty



GetState(self)
Return type:

wx.propgrid.PropertyGridPageState



ParseChoices(self, choicesString: str, idString: str)

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: str)

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: PropertyGrid)
Parameters:

pg (wx.propgrid.PropertyGrid)

Return type:

None



SetState(self, state: PropertyGridPageState)
Parameters:

state (wx.propgrid.PropertyGridPageState)

Return type:

None



static ToLongPCT(s: str, pval: int, max: int)

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