AGW Logo

agw_title multidirdialog

This class represents a possible replacement for wx.DirDialog, with the additional ability of selecting multiple folders at once.


description Description

This class represents a possible replacement for wx.DirDialog, with the additional ability of selecting multiple folders at once. It may be useful when you wish to present to the user a directory browser which allows multiple folder selections. MultiDirDialog sports the following features:

  • Ability to select a single or mutliple folders, depending on the style passed;
  • More colourful and eye-catching buttons;
  • Good old Python code :-D .

And a lot more. Check the demo for an almost complete review of the functionalities.


usage Usage

Usage example:

import os
import wx

import wx.lib.agw.multidirdialog as MDD

# Our normal wxApp-derived class, as usual
app = wx.App(0)

dlg = MDD.MultiDirDialog(None, title="Custom MultiDirDialog", defaultPath=os.getcwd(),
                         agwStyle=MDD.DD_MULTIPLE|MDD.DD_DIR_MUST_EXIST)

if dlg.ShowModal() != wx.ID_OK:
    print "You Cancelled The Dialog!"
    dlg.Destroy()
    return

paths = dlg.GetPaths()
for indx, path in enumerate(paths):
    print "Path %d: %s"%(indx+1, path)

dlg.Destroy()

app.MainLoop()

This code snippet can be downloaded, see this example script.

Note

Some of the AGW snippets of code in the documentation use images and external files (to create bitmaps or access external data). As these files are not provided in these snippets, you should make the approriate modifications to the code to actually run it.


platforms Supported Platforms

MultiDirDialog has been tested on the following platforms:
  • Windows (Windows XP).

styles Window Styles

This class supports the following window styles:


Window styles for multidirdialog
Window Styles Hex Value Description
DD_NEW_DIR_BUTTON 0x000 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.

events Events Processing

No custom events are available for this class.


license License And Version

MultiDirDialog is distributed under the wxPython license.

Latest Revision: Andrea Gavana @ 17 Aug 2011, 15.00 GMT

Version 0.3

Module author: Andrea Gavana <andrea.gavana@gmail.com>


hierarchy Inheritance Diagram

Inheritance diagram for module: multidirdialog

Inheritance diagram of multidirdialog.MultiDirDialog


svn_main SVN Revisions

A graphical representation of the SVN commits in the last year.

Click on any date in the picture to jump to that particular revision page, containing information about committers, log messages and SVN diffs.

multidirdialog

Revision Graph For multidirdialog


2to3 Python 3 Issues (via 2to3)

No issues have been detected by 2to3.py.