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
This commit is contained in:
@@ -78,7 +78,14 @@ class wxPythonDemo(wxFrame):
|
|||||||
self.cwd = os.getcwd()
|
self.cwd = os.getcwd()
|
||||||
self.curOverview = ""
|
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)
|
self.SetIcon(icon)
|
||||||
|
|
||||||
if wxPlatform == '__WXMSW__':
|
if wxPlatform == '__WXMSW__':
|
||||||
|
Reference in New Issue
Block a user