]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/Main.py
updated unicode sample
[wxWidgets.git] / wxPython / demo / Main.py
index 8e630857eff261203560c83477588429d26853af..10912629becbadf7b2b558a6c699fc17ba664f2d 100644 (file)
@@ -13,7 +13,6 @@
 
 import sys, os, time, string
 from   wxPython.wx import *
-from   wxPython.lib.splashscreen import SplashScreen
 from   wxPython.html import wxHtmlWindow
 
 import images
@@ -23,6 +22,9 @@ import images
 
 _treeList = [
     ('New since last release', ['wxGenericDirCtrl',
+                                'wxImageFromStream',
+                                'RowColSizer',
+                                'Unicode',
                                 ]),
 
     ('Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame',
@@ -50,7 +52,9 @@ _treeList = [
                   'wxEditableListBox', 'wxLEDNumberCtrl',
                   ]),
 
-    ('Window Layout', ['wxLayoutConstraints', 'LayoutAnchors', 'Sizers', 'XML_Resource']),
+    ('Window Layout', ['wxLayoutConstraints', 'LayoutAnchors', 'Sizers', 'XML_Resource',
+                       'RowColSizer',
+                       ]),
 
     ('Miscellaneous', [ 'DragAndDrop', 'CustomDragAndDrop', 'URLDragAndDrop',
                         'FontEnumerator',
@@ -60,7 +64,7 @@ _treeList = [
                         'ActiveXWrapper_Acrobat', 'ActiveXWrapper_IE',
                         'wxDragImage', "wxProcess", "FancyText", "OOR", "wxWave",
                         'wxJoystick', 'DrawXXXList', 'ErrorDialogs', 'wxMimeTypesManager',
-                        'ContextHelp', 'SplitTree',
+                        'ContextHelp', 'SplitTree', 'Unicode',
                         ]),
 
     ('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog',
@@ -113,14 +117,7 @@ class wxPythonDemo(wxFrame):
         self.cwd = os.getcwd()
         self.curOverview = ""
 
-        if 1:
-            icon = wxIconFromXPMData(images.getMondrianData())
-        else:
-            # another way to do it
-            bmp = images.getMondrianBitmap()
-            icon = wxEmptyIcon()
-            icon.CopyFromBitmap(bmp)
-
+        icon = images.getMondrianIcon()
         self.SetIcon(icon)
 
         if wxPlatform == '__WXMSW__':
@@ -192,8 +189,8 @@ class wxPythonDemo(wxFrame):
         self.tree = wxTreeCtrl(splitter, tID,
                                style=wxTR_HAS_BUTTONS |
                                wxTR_EDIT_LABELS |
-                               wxTR_HAS_VARIABLE_ROW_HEIGHT |
-                               wxSUNKEN_BORDER)
+                               wxTR_HAS_VARIABLE_ROW_HEIGHT)
+
         #self.tree.SetBackgroundColour(wxNamedColour("Pink"))
         root = self.tree.AddRoot("Overview")
         firstChild = None
@@ -256,12 +253,13 @@ class wxPythonDemo(wxFrame):
 
         # add the windows to the splitter and split it.
         splitter2.SplitHorizontally(self.nb, self.log)
-        splitter2.SetSashPosition(450, true)
-        splitter2.SetMinimumPaneSize(20)
-
         splitter.SplitVertically(self.tree, splitter2)
+
         splitter.SetSashPosition(180, true)
         splitter.SetMinimumPaneSize(20)
+        splitter2.SetSashPosition(450, true)
+        splitter2.SetMinimumPaneSize(20)
+
 
 
         # select initial items
@@ -482,7 +480,7 @@ class MySplashScreen(wxSplashScreen):
         frame = wxPythonDemo(None, -1, "wxPython: (A Demonstration)")
         frame.Show(true)
         self.ShowTip(frame)
-        evt.Skip()
+        self.Destroy()
 
     def ShowTip(self, frame):
         try: