.. 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.EditorDialogProperty:
==========================================================================================================================================
|phoenix_title| **wx.propgrid.EditorDialogProperty**
==========================================================================================================================================
This is an abstract class which serves as a base class for the properties having a button triggering an editor dialog, like e.g.
:ref:`wx.propgrid.LongStringProperty`, :ref:`wx.propgrid.DirProperty`, :ref:`wx.propgrid.FileProperty`.
**Supported special attributes:**
- ``PG_DIALOG_TITLE``: Sets a specific title for the editor dialog.
.. versionadded:: 4.1/wxWidgets-3.1.3
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
EditorDialogProperty:
|
|sub_classes| Known Subclasses
==============================
:ref:`wx.propgrid.ArrayStringProperty`, :ref:`wx.propgrid.DirProperty`, :ref:`wx.propgrid.FileProperty`, :ref:`wx.propgrid.FontProperty`, :ref:`wx.propgrid.LongStringProperty`, :ref:`wx.propgrid.MultiChoiceProperty`
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.propgrid.EditorDialogProperty.DisplayEditorDialog` Shows editor dialog.
:meth:`~wx.propgrid.EditorDialogProperty.DoSetAttribute` Reimplement this member function to add special handling for attributes of this property.
:meth:`~wx.propgrid.EditorDialogProperty.GetEditorDialog` Returns instance of a new :ref:`wx.propgrid.PGEditorDialogAdapter` instance, which is used when user presses the (optional) button next to the editor control;.
:meth:`~wx.propgrid.EditorDialogProperty.__init__` Constructor is protected because :ref:`wx.propgrid.EditorDialogProperty` is only the base class for other property classes.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.propgrid.EditorDialogProperty.EditorDialog` See :meth:`~wx.propgrid.EditorDialogProperty.GetEditorDialog`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.propgrid.EditorDialogProperty(PGProperty)
**Possible constructors**::
EditorDialogProperty(label : str, name : str) -> None
This is an abstract class which serves as a base class for the
properties having a button triggering an editor dialog, like e.g.
.. method:: DisplayEditorDialog(self, pg : PropertyGrid, value : PGVariant)
Shows editor dialog.
Value to be edited should be read from `value`, and if dialog is not cancelled, it should be stored back and ``True`` should be returned.
:param `pg`: Property grid in which property is displayed.
:type `pg`: wx.propgrid.PropertyGrid
:param `value`: Value to be edited.
:type `value`: PGVariant
:rtype: `bool`
:returns:
Returns ``True`` if editor dialog was not cancelled and `value` was updated.
.. method:: DoSetAttribute(self, name : str, value : PGVariant)
Reimplement this member function to add special handling for attributes of this property.
:param `name`:
:type `name`: string
:param `value`:
:type `value`: PGVariant
:rtype: `bool`
:returns:
Return ``False`` to have the attribute automatically stored in m_attributes. Default implementation simply does that and nothing else.
.. note::
To actually set property attribute values from the application, use :meth:`wx.propgrid.PGProperty.SetAttribute` instead.
.. method:: GetEditorDialog(self)
Returns instance of a new :ref:`wx.propgrid.PGEditorDialogAdapter` instance, which is used when user presses the (optional) button next to the editor control;.
Default implementation returns ``None`` (i.e. no action is generated when button is pressed).
:rtype: :ref:`wx.propgrid.PGEditorDialogAdapter`
.. method:: __init__(self, label : str, name : str)
Constructor is protected because :ref:`wx.propgrid.EditorDialogProperty` is only the base class for other property classes.
:param `label`:
:type `label`: string
:param `name`:
:type `name`: string
:rtype: `None`
.. attribute:: EditorDialog
See :meth:`~wx.propgrid.EditorDialogProperty.GetEditorDialog`