Python
  Home arrow Python arrow Page 5 - Dialogs in wxPython
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PYTHON

Dialogs in wxPython
By: Peyton McCullough
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 13
    2005-08-01

    Table of Contents:
  • Dialogs in wxPython
  • wxScrolledMessageDialog
  • wxProgressDialog
  • ImageDialog
  • wxDirDialog
  • wxFileDialog

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Dialogs in wxPython - wxDirDialog


    (Page 5 of 6 )

    If your application requires the user to select a directory for something, consider using wxDirDialog. It allows the user to pick a directory from a tree:

    from wxPython.wx import *

    application = wxPySimpleApp()

    # Create the dialog

    dialog = wxDirDialog ( None, message = 'Pick a directory.' )

    # Show the dialog and get user input

    if dialog.ShowModal() == wxID_OK:

       print 'Directory:', dialog.GetPath()

    # The user cancelled

    else:

       print 'No directory.'

    # Get rid of the dialog

    dialog.Destroy()

    It is also possible to allow the user to create a new directory from within the dialog by passing the wxDD_NEW_DIR_BUTTON style:

    from wxPython.wx import *

    application = wxPySimpleApp()

    dialog = wxDirDialog ( None, message = 'Pick a directory.', style = wxDD_NEW_DIR_BUTTON )

    if dialog.ShowModal() == wxID_OK:

       print 'Directory:', dialog.GetPath()

    else:

       print 'No directory.'

    dialog.Destroy()

    More Python Articles
    More By Peyton McCullough


       · goog topic, but it doesn't work well :Traceback (most recent call last): File...
       · We returned to the original article and it seemed that a line of code was missed...
       · Vous avez écrit :dialog = wxScrolledMessageDialog ( self, text, 'Fairy Tale'...
     

       

    PYTHON ARTICLES

    - SSH with Twisted
    - Mobile Programming in Python using PyS60: UI...
    - Python: Count on It
    - Python Strings: Spinning Yarns
    - Python: More Fun with Strings
    - Python: Stringing You Along
    - Python Operators
    - Bluetooth Programming in Python: Network Pro...
    - Python Sets
    - Python Conditionals, Lists, Dictionaries, an...
    - Python: Input and Variables
    - Introduction to Python Programming
    - Mobile Programming in Python using PyS60: Ge...
    - Bluetooth Programming using Python
    - Finishing the PyMailGUI Client: User Help To...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway