.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.propgrid.DirProperty:

==========================================================================================================================================
|phoenix_title|  **wx.propgrid.DirProperty**
==========================================================================================================================================

Like :ref:`wx.propgrid.LongStringProperty`, but the button triggers dir selector instead.          

**Supported special attributes:**

- "DialogMessage": Sets specific message in the dir selector.  


          




|

|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>DirProperty</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.DirProperty_inheritance.png" alt="Inheritance diagram of DirProperty" 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.DirProperty.html" title="wx.propgrid.DirProperty" alt="" coords="30,237,207,267"/> <area shape="rect" id="node2" href="wx.propgrid.LongStringProperty.html" title="wx.propgrid.LongStringProperty" alt="" coords="5,160,232,189"/> <area shape="rect" id="node3" href="wx.propgrid.PGProperty.html" title="wx.propgrid.PGProperty" alt="" coords="31,83,207,112"/> <area shape="rect" id="node4" href="wx.Object.html" title="wx.Object" alt="" coords="75,5,162,35"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.propgrid.DirProperty.__init__`                                        
:meth:`~wx.propgrid.DirProperty.DoGetValidator`                                  Returns pointer to the :ref:`wx.Validator`  that should be used with the editor of this property (``None`` for no validator).
:meth:`~wx.propgrid.DirProperty.DoSetAttribute`                                  Reimplement this member function to add special handling for attributes of this property.
:meth:`~wx.propgrid.DirProperty.OnButtonClick`                                   
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.propgrid.DirProperty(LongStringProperty)

   **Possible constructors**::

       DirProperty(name=PG_LABEL, label=PG_LABEL, value="")
       
   
   Like LongStringProperty, but the button triggers dir selector
   instead.



   .. method:: __init__(self, name=PG_LABEL, label=PG_LABEL, value=EmptyString)




      :param `name`: 
      :type `name`: string
      :param `label`: 
      :type `label`: string
      :param `value`: 
      :type `value`: string







   .. method:: DoGetValidator(self)

      Returns pointer to the :ref:`wx.Validator`  that should be used with the editor of this property (``None`` for no validator).                  

      Setting validator explicitly via SetPropertyValidator will override this. 

      In most situations, code like this should work well (macros are used to maintain one actual validator instance, so on the second call the function exits within the first macro): 

      ::

          class MyPropertyClass(wx.propgrid.DirProperty):
              ...
              def DoGetValidator(self):
                  validator = MyValidator(...)

                  ... prepare validator...

                  return validator



                

      :rtype: :ref:`Validator`







      .. note:: 

         You can get common filename validator by returning :meth:`wx.propgrid.FileProperty.GetClassValidator` . :ref:`wx.propgrid.DirProperty`, for example, uses it.   








   .. 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:: OnButtonClick(self, propGrid, value)




      :param `propGrid`: 
      :type `propGrid`: wx.propgrid.PropertyGrid
      :param `value`: 
      :type `value`: string




      :rtype: `tuple`







      :returns: 

         ( `bool`, `value` ) 







