]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/GIFAnimationCtrl.py
Remove debugging code accidentally left in
[wxWidgets.git] / wxPython / demo / GIFAnimationCtrl.py
CommitLineData
2e5aa9c4
RD
1
2import wx
3from wx.animate import GIFAnimationCtrl
4
5from Main import opj
6
7GIFNames = [
8 "bitmaps/ani-bttrfly.gif",
9 "bitmaps/ani-avtr.gif",
10 "bitmaps/ani-phone.gif",
11# "bitmaps/ani-walker.gif",
12 "bitmaps/ani-man.gif",
13 "bitmaps/ani-bookworm.gif",
14 "bitmaps/ani-hooked.gif",
15 ]
16
17#----------------------------------------------------------------------
18
19class TestPanel(wx.Panel):
20 def __init__(self, parent, log):
21 self.log = log
22 wx.Panel.__init__(self, parent, -1)
23
24 sizer = wx.FlexGridSizer(2,3,5,5)
25 for name in GIFNames:
26 ani = GIFAnimationCtrl(self, -1, opj(name))
27 ani.GetPlayer().UseBackgroundColour(True)
28 ani.Play()
29 sizer.Add(ani, 0, wx.ALL, 10)
30
31 border = wx.BoxSizer()
32 border.Add(sizer, 1, wx.EXPAND|wx.ALL, 20)
33 self.SetSizer(border)
34
35
36#----------------------------------------------------------------------
37
38def runTest(frame, nb, log):
39 win = TestPanel(nb, log)
40 return win
41
42#----------------------------------------------------------------------
43
44
45
46overview = """<html><body>
47<h2><center>wx.animate.GIFAnimationCtrl</center></h2>
48
49wx.animate.GIFAnimationCtrl is like a wx.StaticBitmap but is able to
50display an animation by extracing frames from a multi-images GIF file.
51
52</body></html>
53"""
54
55
56
57if __name__ == '__main__':
58 import sys,os
59 import run
60 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
61