1
1
Aaron Stevens
8 April 2009
CS108 Lecture 28: Graphical User Interface: Using PythonCard Dialogs
2
CS108 Lecture 28: Graphical User Interface: Using PythonCard - - PDF document
CS108 Lecture 28: Graphical User Interface: Using PythonCard Dialogs Aaron Stevens 8 April 2009 1 Overview/Questions How do we start developing GUI applications? Programming with events: Some useful starter code. Using the
1
2
3
4
for either Windows or Mac, as needed.
5
6
7
8
9
10
11
12
result = dialog.messageDialog(self, <message>, <title>)
13
result = dialog.textEntryDialog(self, <message>, <title>, <defaultText>)
Print out return value to see its elements.
14
result = dialog.singleChoiceDialog(self, <message>, <title>,<list>)
15
result = dialog.scrolledMessageDialog(self, <message>, <title>)
16
result = dialog.fileDialog(self, <message>, <path>, <filename>, <wildcard>)
result = dialog.fileDialog(self, <message>,’’,’’,’’)
17
*Note: the API page is wrong when it says that the return value is a dict object. It should read: "The <whatever>Dialog component returns a wxPython DialogResults object which contains <number> values, as shown in the following table."
18
19
20
The PythonCard Dialogs: (today)
http://pythoncard.sourceforge.net/dialogs/index.html
The PythonCard Resource editor (next week)
http://pythoncard.sourceforge.net/resource_editor_overview.html
** only needed if you want to do hws on your own computer