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

Inheritance diagram for class
MultiDirDialog:
|
|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.