.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2017 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
Inheritance diagram for class DirProperty:

| |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="") :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: `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` )