.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. _wx.propgrid.PropertyGridPopulator: ========================================================================================================================================== |phoenix_title| **wx.propgrid.PropertyGridPopulator** ========================================================================================================================================== Allows populating :ref:`wx.propgrid.PropertyGrid` from arbitrary text source. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class PropertyGridPopulator:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.propgrid.PropertyGridPopulator.__init__` Default constructor. :meth:`~wx.propgrid.PropertyGridPopulator.Add` Appends a new property under bottommost parent. :meth:`~wx.propgrid.PropertyGridPopulator.AddAttribute` Adds attribute to the bottommost property. :meth:`~wx.propgrid.PropertyGridPopulator.AddChildren` Pushes property to the back of parent array (ie it becomes bottommost parent), and starts scanning/adding children for it. :meth:`~wx.propgrid.PropertyGridPopulator.DoScanForChildren` Called once in AddChildren. :meth:`~wx.propgrid.PropertyGridPopulator.GetCurParent` Returns id of parent property for which children can currently be added. :meth:`~wx.propgrid.PropertyGridPopulator.GetState` :meth:`~wx.propgrid.PropertyGridPopulator.ParseChoices` Parses strings of format "choice1"[=value1] ... :meth:`~wx.propgrid.PropertyGridPopulator.ProcessError` Implement in derived class to do custom process when an error occurs. :meth:`~wx.propgrid.PropertyGridPopulator.SetGrid` :meth:`~wx.propgrid.PropertyGridPopulator.SetState` :meth:`~wx.propgrid.PropertyGridPopulator.ToLongPCT` Like :meth:`String.ToLong` , except allows N% in addition of N. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.propgrid.PropertyGridPopulator.CurParent` See :meth:`~wx.propgrid.PropertyGridPopulator.GetCurParent` :attr:`~wx.propgrid.PropertyGridPopulator.State` See :meth:`~wx.propgrid.PropertyGridPopulator.GetState` and :meth:`~wx.propgrid.PropertyGridPopulator.SetState` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.propgrid.PropertyGridPopulator(object) **Possible constructors**:: PropertyGridPopulator() Allows populating PropertyGrid from arbitrary text source. .. method:: __init__(self) Default constructor. .. method:: Add(self, propClass, propLabel, propName, propValue, pChoices=None) Appends a new property under bottommost parent. :param `propClass`: Property class as string. :type `propClass`: string :param `propLabel`: Property label. :type `propLabel`: string :param `propName`: Property name. :type `propName`: string :param `propValue`: Property value. :type `propValue`: string :param `pChoices`: Set of choices for the property (optional). :type `pChoices`: wx.propgrid.PGChoices :rtype: :ref:`wx.propgrid.PGProperty` .. method:: AddAttribute(self, name, type, value) Adds attribute to the bottommost property. :param `name`: Attribute name. :type `name`: string :param `type`: Allowed values: ``"string"`` , (same as string), ``"int"`` , ``"bool"`` . Empty string means autodetect. :type `type`: string :param `value`: Attribute value. :type `value`: string :rtype: `bool` .. method:: 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. :param `property`: :type `property`: wx.propgrid.PGProperty .. method:: DoScanForChildren(self) Called once in AddChildren. .. method:: GetCurParent(self) Returns id of parent property for which children can currently be added. :rtype: :ref:`wx.propgrid.PGProperty` .. method:: GetState(self) :rtype: :ref:`wx.propgrid.PropertyGridPageState` .. method:: ParseChoices(self, choicesString, idString) Parses strings of format "choice1"[=value1] ... "choiceN"[=valueN] into :ref:`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. :param `choicesString`: :type `choicesString`: string :param `idString`: :type `idString`: string :rtype: :ref:`wx.propgrid.PGChoices` .. method:: ProcessError(self, msg) Implement in derived class to do custom process when an error occurs. Default implementation uses LogError. :param `msg`: :type `msg`: string .. method:: SetGrid(self, pg) :param `pg`: :type `pg`: wx.propgrid.PropertyGrid .. method:: SetState(self, state) :param `state`: :type `state`: wx.propgrid.PropertyGridPageState .. staticmethod:: ToLongPCT(s, pval, max) Like :meth:`String.ToLong` , except allows N% in addition of N. :param `s`: :type `s`: string :param `pval`: :type `pval`: long :param `max`: :type `max`: long :rtype: `bool` .. attribute:: CurParent See :meth:`~wx.propgrid.PropertyGridPopulator.GetCurParent` .. attribute:: State See :meth:`~wx.propgrid.PropertyGridPopulator.GetState` and :meth:`~wx.propgrid.PropertyGridPopulator.SetState`