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