]>
Commit | Line | Data |
---|---|---|
1 | This sample comes from an IBM developerWorks article at | |
2 | http://www-106.ibm.com/developerworks/library/l-wxpy/index.html | |
3 | ||
4 | Modifications by Franz Steinhaeusler 08.Feb.2006: | |
5 | - tried to meet the wxPython Style Guide | |
6 | (http://wiki.wxpython.org/index.cgi/wxPython_20Style_20Guide) | |
7 | (also take care to use id's as less as possible) | |
8 | - added docstrings | |
9 | - used wx Namespace (recommend use after wxPython 2.5) | |
10 | and Bind instead directly EVT_MENU | |
11 | - set indentation to 4 spaces | |
12 | - used MsgDlg for better overview | |
13 | - added info (for adding or removing files without a root item) | |
14 | - completed the menu function: File open. | |
15 | - if a file was changed, and you want to quit the app, you are now | |
16 | asked to save the file. | |
17 | - there was a traceback with self.tree.GetFirstChild(self.root). fixed. | |
18 | - close handler (save file, if you also close with mouse or alt-F4) | |
19 | ||
20 | Modifications by Chris Barker, 08.Feb.2006: | |
21 | - changed first line to #!/usr/bin/env python. | |
22 | - Removing a bunch of superfluous IDs of the menu items and | |
23 | event handlers and in splitterwindow. | |
24 | ||
25 | Modifications by Franz Steinhaeusler 08.Feb.2006: | |
26 | - added short program description. | |
27 | - removed the string module (it is somewhat "deprecated". | |
28 | - added some comments | |
29 | - changed treecontrol to default style. | |
30 | (I think, because of the plus and minus signs, | |
31 | it is much clearer then, whether the root | |
32 | item is empty or not. If there is no sign, the | |
33 | root item doesn't have any children). | |
34 | ||
35 | ||
36 |