]> git.saurik.com Git - wxWidgets.git/commitdiff
Show how to get an icon from a bitmap
authorRobin Dunn <robin@alldunn.com>
Mon, 30 Apr 2001 18:33:20 +0000 (18:33 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 30 Apr 2001 18:33:20 +0000 (18:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/Main.py

index 8f8297e7734bb6382af46032731e513f78edaf6d..6ab783ec33b08fa8025ef982a36fdcb2241ab660 100644 (file)
@@ -78,7 +78,14 @@ class wxPythonDemo(wxFrame):
         self.cwd = os.getcwd()
         self.curOverview = ""
 
-        icon = wxIconFromXPMData(images.getMondrianData())
+        if 1:
+            icon = wxIconFromXPMData(images.getMondrianData())
+        else:
+            # another way to do it
+            bmp = images.getMondrianBitmap()
+            icon = wxEmptyIcon()
+            icon.CopyFromBitmap(bmp)
+
         self.SetIcon(icon)
 
         if wxPlatform == '__WXMSW__':