]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxStaticBitmap.py
Fix so the value given to wxTextEntryDialog::SetValue will actually be
[wxWidgets.git] / wxPython / demo / wxStaticBitmap.py
1
2 from wxPython.wx import *
3 from Main import opj
4
5 import string
6 import images
7
8 #----------------------------------------------------------------------
9
10 class TestPanel(wxPanel):
11 def __init__(self, parent, log):
12 wxPanel.__init__(self, parent, -1)
13 self.log = log
14 self.count = 0
15
16 wxStaticText(self, -1, "This is a wxStaticBitmap.", wxPoint(45, 15))
17
18 bmp = images.getTest2Bitmap()
19 mask = wxMaskColour(bmp, wxBLUE)
20 bmp.SetMask(mask)
21 wxStaticBitmap(self, -1, bmp, wxPoint(80, 50),
22 wxSize(bmp.GetWidth(), bmp.GetHeight()))
23
24 # This one doesn't convert to the embedded format very well,
25 # (lots of colors so it explodes in size and takes a noticable
26 # amount of time to convert back to a bitmap.) So we'll just
27 # do it the old way
28 bmp = wxBitmap(opj('bitmaps/robin.jpg'), wxBITMAP_TYPE_JPEG)
29 wxStaticBitmap(self, -1, bmp, (80, 150))
30
31 wxStaticText(self, -1, "Hey, if Ousterhout can do it, so can I.",
32 (200, 175))
33
34
35 #----------------------------------------------------------------------
36
37 def runTest(frame, nb, log):
38 win = TestPanel(nb, log)
39 return win
40
41 #----------------------------------------------------------------------
42
43
44
45
46
47
48
49
50
51
52 overview = """\
53 """