Python
  Home arrow Python arrow Page 2 - 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 
IBM developerWorks
 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 - wxScrolledMessageDialog


    (Page 2 of 6 )

    Suppose you need to display a long message, such as the terms of use for your application. A good way to display this would be to use a wxScrolledMessageDialog. It features a read-only multi-line text box, and it's very easy to put into your applications:

    from wxPython.wx import *

    application = wxPySimpleApp()

    # Set up the text

    text = """Once upon a time, there lived a knight named Sir Esthimus.

    Sir Esthimus decided to marry the princess one day. So, he went to the king

    and asked if he could marry his lovely daughter. The king said that he had to

    defeat the strongest goblin in the kingdom's dungeons. The knight agreed to

    fight the goblin, and the next day, the king summoned both the beast and the

    knight to the town square. A sturdy iron fence had been erected overnight to

    keep the two fighters inside. The king waved his hand -- the signal for the match

    to begin. The knight pulled out his sword, and goblin pulled out his spear. The goblin

    then pierced the knight's sword arm, so the knight lost the fight and did not get to marry

    the princess.

    Notice the scrollbar to the right. It enables you to

    write

    large

    amounts

    of

    text

    to

    the

    dialog and have it organized neatly."""

    # Create the dialog

    dialog = wxScrolledMessageDialog ( self, text, 'Fairy Tale' )

    # Show the dialog

    dialog.ShowModal()

    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