]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxStaticBitmap.py
2 from wxPython
.wx
import *
7 #----------------------------------------------------------------------
9 class TestPanel(wxPanel
):
10 def __init__(self
, parent
, log
):
11 wxPanel
.__init
__(self
, parent
, -1)
15 wxStaticText(self
, -1, "This is a wxStaticBitmap.", wxPoint(45, 15))
17 bmp
= images
.getTest2Bitmap()
18 mask
= wxMaskColour(bmp
, wxBLUE
)
20 wxStaticBitmap(self
, -1, bmp
, wxPoint(80, 50),
21 wxSize(bmp
.GetWidth(), bmp
.GetHeight()))
23 # This one doesn't convert to the embedded format very well,
24 # (lots of colors so it explodes in size and takes a noticable
25 # amount of time to convert back to a bitmap.) So we'll just
27 bmp
= wxBitmap('bitmaps/robin.jpg', wxBITMAP_TYPE_JPEG
)
28 wxStaticBitmap(self
, -1, bmp
, (80, 150))
30 wxStaticText(self
, -1, "Hey, if Ousterhout can do it, so can I.",
34 #----------------------------------------------------------------------
36 def runTest(frame
, nb
, log
):
37 win
= TestPanel(nb
, log
)
40 #----------------------------------------------------------------------