.. 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.PropertyCategory:
==========================================================================================================================================
|phoenix_title| **wx.propgrid.PropertyCategory**
==========================================================================================================================================
Category (caption) property.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
PropertyCategory:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.propgrid.PropertyCategory.__init__` Default constructor is only used in special cases.
:meth:`~wx.propgrid.PropertyCategory.GetTextExtent`
:meth:`~wx.propgrid.PropertyCategory.GetValueAsString` Returns text representation of property's value.
:meth:`~wx.propgrid.PropertyCategory.ValueToString` Converts property value into a text representation.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.propgrid.PropertyCategory.ValueAsString` See :meth:`~wx.propgrid.PropertyCategory.GetValueAsString`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.propgrid.PropertyCategory(PGProperty)
**Possible constructors**::
PropertyCategory() -> None
PropertyCategory(label : str, name: str=PG_LABEL) -> None
Category (caption) property.
.. method:: __init__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__init__** `(self)`
Default constructor is only used in special cases.
:rtype: `None`
:html:`
`
**__init__** `(self, label : str, name: str=PG_LABEL)`
:param `label`:
:type `label`: string
:param `name`:
:type `name`: string
:rtype: `None`
:html:`
`
.. method:: GetTextExtent(self, wnd : Window, font : Font)
:param `wnd`:
:type `wnd`: wx.Window
:param `font`:
:type `font`: wx.Font
:rtype: `int`
.. method:: GetValueAsString(self, argFlags: int=0)
Returns text representation of property's value.
:param `argFlags`: If 0 (default value), then displayed string is returned. If ``PG_FULL_VALUE`` is set, returns complete, storable string value instead of displayable. If ``PG_EDITABLE_VALUE`` is set, returns string value that must be editable in textctrl. If ``PG_COMPOSITE_FRAGMENT`` is set, returns text that is appropriate to display as a part of string property's composite text representation.
:type `argFlags`: int
:rtype: `str`
.. note::
In older versions, this function used to be overridden to convert property's value into a string representation. This function is now handled by :meth:`ValueToString` , and overriding this function now will result in run-time assertion failure.
.. method:: ValueToString(self, value : PGVariant, argFlags : int)
Converts property value into a text representation.
:param `value`: Value to be converted.
:type `value`: PGVariant
:param `argFlags`: If 0 (default value), then displayed string is returned. If ``PG_FULL_VALUE`` is set, returns complete, storable string value instead of displayable. If ``PG_EDITABLE_VALUE`` is set, returns string value that must be editable in textctrl. If ``PG_COMPOSITE_FRAGMENT`` is set, returns text that is appropriate to display as a part of string property's composite text representation.
:type `argFlags`: int
:rtype: `str`
.. note::
Default implementation calls :meth:`~wx.propgrid.PGProperty.GenerateComposedValue` .
.. attribute:: ValueAsString
See :meth:`~wx.propgrid.PropertyCategory.GetValueAsString`