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

.. currentmodule:: wx.lib.agw.multidirdialog

.. highlight:: python



.. _wx.lib.agw.multidirdialog.MultiDirDialog:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.multidirdialog.MultiDirDialog**
==========================================================================================================================================

A different implementation of :class:`DirDialog` which allows multiple
folders to be selected at once.



|

|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>MultiDirDialog</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.lib.agw.multidirdialog.MultiDirDialog_inheritance.svg" alt="Inheritance diagram of MultiDirDialog" 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.lib.agw.multidirdialog.MultiDirDialog.html" title="A different implementation of DirDialog which allows multiple" alt="" coords="5,543,314,572"/> <area shape="rect" id="node2" href="wx.Dialog.html" title="A dialog box is a window with a title bar and sometimes a system menu, which can be moved around the screen." alt="" coords="110,466,210,495"/> <area shape="rect" id="node3" href="wx.TopLevelWindow.html" title="wx.TopLevelWindow  is a common base class for wx.Dialog  and wx.Frame." alt="" coords="72,389,248,418"/> <area shape="rect" id="node4" href="wx.NonOwnedWindow.html" title="Common base class for all non-child windows." alt="" coords="64,313,256,341"/> <area shape="rect" id="node5" href="wx.Window.html" title="wx.Window  is the base class for all windows and represents any visible object on screen." alt="" coords="104,236,215,265"/> <area shape="rect" id="node6" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="86,159,234,188"/> <area shape="rect" id="node7" href="wx.EvtHandler.html" title="A class that can handle events from the windowing system." alt="" coords="93,82,226,111"/> <area shape="rect" id="node8" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="44,5,142,34"/> <area shape="rect" id="node9" href="wx.Trackable.html" title="Add-on base class for a trackable object." alt="" coords="166,5,289,34"/> </map> 
   </p>
   </div>

|


|appearance| Control Appearance
===============================

|

.. container:: control-appearance-figures

   .. figure:: _static/images/widgets/fullsize/wxmsw/wx.lib.agw.multidirdialog.multidirdialog.png
      :alt: wxMSW
      :figclass: appearance-figure

      **wxMSW**


   .. figure:: _static/images/widgets/fullsize/wxmac/../no_appearance.png
      :alt: wxMAC
      :figclass: appearance-figure

      **wxMAC**


   .. figure:: _static/images/widgets/fullsize/wxgtk/wx.lib.agw.multidirdialog.multidirdialog.png
      :alt: wxGTK
      :figclass: appearance-figure

      **wxGTK**

|




|super_classes| Known Superclasses
==================================

:class:`wx.Dialog`

|


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

================================================================================ ================================================================================
:meth:`~wx.lib.agw.multidirdialog.MultiDirDialog.__init__`                       Default class constructor.
:meth:`~wx.lib.agw.multidirdialog.MultiDirDialog.BindEvents`                     Binds the events to specific methods.
:meth:`~wx.lib.agw.multidirdialog.MultiDirDialog.CreateButtons`                  Creates the ``OK``, ``Cancel`` and ``Make New Folder`` bitmap buttons.
:meth:`~wx.lib.agw.multidirdialog.MultiDirDialog.GetPaths`                       Returns the folders selected by the user, or the default path.
:meth:`~wx.lib.agw.multidirdialog.MultiDirDialog.LayoutItems`                    Layout the widgets using sizers.
:meth:`~wx.lib.agw.multidirdialog.MultiDirDialog.OnCancel`                       Handles the ``wx.EVT_BUTTON`` event for the dialog.
:meth:`~wx.lib.agw.multidirdialog.MultiDirDialog.OnClose`                        Handles the ``wx.EVT_CLOSE`` event for the dialog.
:meth:`~wx.lib.agw.multidirdialog.MultiDirDialog.OnKeyUp`                        Handles the ``wx.EVT_CHAR_HOOK`` event for the dialog.
:meth:`~wx.lib.agw.multidirdialog.MultiDirDialog.OnOk`                           Handles the ``wx.EVT_BUTTON`` event for the dialog.
:meth:`~wx.lib.agw.multidirdialog.MultiDirDialog.OnSelChanged`                   Handles the ``wx.EVT_TREE_SEL_CHANGED`` event for the tree control associated
:meth:`~wx.lib.agw.multidirdialog.MultiDirDialog.SetProperties`                  Sets few properties for the dialog.
:meth:`~wx.lib.agw.multidirdialog.MultiDirDialog.SetupDirCtrl`                   Setup the internal :class:`GenericDirCtrl` (icons, labels, etc...).
================================================================================ ================================================================================


|


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


.. class:: MultiDirDialog(wx.Dialog)

   A different implementation of :class:`DirDialog` which allows multiple
   folders to be selected at once.

   .. method:: __init__(self, parent, message=_("Choose one or more folders:"), title=_("Browse For Folders"), defaultPath="", style=wx.DD_DEFAULT_STYLE, agwStyle=DD_MULTIPLE, pos=wx.DefaultPosition, size=wx.DefaultSize, name="multidirdialog")

      Default class constructor.
      
      :param `parent`: the dialog parent widget;
      :param `message`: the message to show on the dialog;
      :param `title`: the dialog title;
      :param `defaultPath`: the default path, or the empty string;
      :param `style`: the underlying :class:`Dialog` window style;
      :param `agwStyle`: the AGW-specific dialog style; this can be a combination of the
       following bits:
      
       ===================== =========== ==================================================
       Window Styles         Hex Value   Description
       ===================== =========== ==================================================
       ``DD_NEW_DIR_BUTTON``       0x080 Enable/disable the "Make new folder" button
       ``DD_DIR_MUST_EXIST``       0x200 The dialog will allow the user to choose only an existing folder. When this style is not given, a "Create new directory" button is added to the dialog (on Windows) or some other way is provided to the user to type the name of a new folder.
       ``DD_MULTIPLE``             0x400 Allows the selection of multiple folders.
       ===================== =========== ==================================================
      
      :param `pos`: the dialog position;
      :param `size`: the dialog size;
      :param `name`: the dialog name.


   .. method:: BindEvents(self)

      Binds the events to specific methods. 


   .. method:: CreateButtons(self)

      Creates the ``OK``, ``Cancel`` and ``Make New Folder`` bitmap buttons. 


   .. method:: GetPaths(self)

      Returns the folders selected by the user, or the default path. 


   .. method:: LayoutItems(self, message)

      Layout the widgets using sizers. 


   .. method:: OnCancel(self, event)

      Handles the ``wx.EVT_BUTTON`` event for the dialog.
      
      :param `event`: a :class:`CommandEvent` event to be processed.
      
      .. note:: This method handles the ``Cancel`` button press.


   .. method:: OnClose(self, event)

      Handles the ``wx.EVT_CLOSE`` event for the dialog.
      
      :param `event`: a :class:`CloseEvent` event to be processed.


   .. method:: OnKeyUp(self, event)

      Handles the ``wx.EVT_CHAR_HOOK`` event for the dialog.
      
      :param `event`: a :class:`KeyEvent` event to be processed.


   .. method:: OnOk(self, event)

      Handles the ``wx.EVT_BUTTON`` event for the dialog.
      
      :param `event`: a :class:`CommandEvent` event to be processed.
      
      .. note:: This method handles the ``OK`` button press.


   .. method:: OnSelChanged(self, event)

      Handles the ``wx.EVT_TREE_SEL_CHANGED`` event for the tree control associated
      with :class:`MultiDirDialog`.
      
      :param `event`: a :class:`TreeEvent` event to be processed.


   .. method:: SetProperties(self, title)

      Sets few properties for the dialog.
      
      :param `title`: the dialog title.


   .. method:: SetupDirCtrl(self, defaultPath)

      Setup the internal :class:`GenericDirCtrl` (icons, labels, etc...).
      
      :param `defaultPath`: the default path for :class:`MultiDirDialog`, can be an
       empty string.


