.. 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

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>EditorDialogProperty</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.propgrid.EditorDialogProperty_inheritance.svg" alt="Inheritance diagram of EditorDialogProperty" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.propgrid.EditorDialogProperty.html" title="This is an abstract class which serves as a base class for the properties having a button triggering an editor dialog, like e.g." alt="" coords="5,159,270,188"/> <area shape="rect" id="node2" href="wx.propgrid.PGProperty.html" title="wx.propgrid.PGProperty  is base class for all wx.propgrid.PropertyGrid  properties and as such it is not intended to be instantiated directly." alt="" coords="38,82,237,111"/> <area shape="rect" id="node3" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="88,5,187,34"/> </map> 
   </p>
   </div>

|


|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, name) -> 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, value)

      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, value)

      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, name)

      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`

