]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/wxStaticBitmap.py
checked in forgottern parts of MSLU changes
[wxWidgets.git] / wxPython / demo / wxStaticBitmap.py
CommitLineData
cf694132
RD
1
2from wxPython.wx import *
6c5ae2d2 3from Main import opj
cf694132
RD
4
5import string
96bfd053 6import images
cf694132
RD
7
8#----------------------------------------------------------------------
9
10class 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
96bfd053 18 bmp = images.getTest2Bitmap()
1b62f00d
RD
19 mask = wxMaskColour(bmp, wxBLUE)
20 bmp.SetMask(mask)
cf694132
RD
21 wxStaticBitmap(self, -1, bmp, wxPoint(80, 50),
22 wxSize(bmp.GetWidth(), bmp.GetHeight()))
23
493f1553
RD
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
6c5ae2d2 28 bmp = wxBitmap(opj('bitmaps/robin.jpg'), wxBITMAP_TYPE_JPEG)
1b62f00d 29 wxStaticBitmap(self, -1, bmp, (80, 150))
cf694132 30
1b62f00d
RD
31 wxStaticText(self, -1, "Hey, if Ousterhout can do it, so can I.",
32 (200, 175))
cf694132
RD
33
34
35#----------------------------------------------------------------------
36
37def runTest(frame, nb, log):
38 win = TestPanel(nb, log)
39 return win
40
41#----------------------------------------------------------------------
42
43
44
45
46
47
48
49
50
51
52overview = """\
53"""