We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78ccfd4 commit 83e775aCopy full SHA for 83e775a
AutoSizeBitmap.py
@@ -7,6 +7,7 @@
7
"""
8
9
import wx
10
+print "using wxPython version:", wx.__version__
11
12
class AutoSizeBitmap(wx.Window):
13
@@ -36,7 +37,10 @@ def OnSize(self, evt=None):
36
37
38
def OnPaint(self, evt=None):
39
dc = wx.PaintDC(self)
- dc.DrawBitmap(self.bitmap,0,0)
40
+ try:
41
+ dc.DrawBitmap(self.bitmap,0,0)
42
+ except ValueError: # in case bitmap has not yet been initialized
43
+ pass
44
45
if __name__ == "__main__":
46
import sys
0 commit comments