From: Robin Dunn Date: Mon, 30 Apr 2001 18:33:20 +0000 (+0000) Subject: Show how to get an icon from a bitmap X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b6962846e822d02d074f34db8833edd2ef9f2be2 Show how to get an icon from a bitmap git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index 8f8297e773..6ab783ec33 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -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__':