]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/GIFAnimationCtrl.py
a91c6f0abcc723db93eb4662cfe0d67b18112466
3 from wx
.animate
import GIFAnimationCtrl
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",
17 #----------------------------------------------------------------------
19 class TestPanel(wx
.Panel
):
20 def __init__(self
, parent
, log
):
22 wx
.Panel
.__init
__(self
, parent
, -1)
24 sizer
= wx
.FlexGridSizer(2,3,5,5)
26 ani
= GIFAnimationCtrl(self
, -1, opj(name
))
27 ani
.GetPlayer().UseBackgroundColour(True)
29 sizer
.Add(ani
, 0, wx
.ALL
, 10)
31 border
= wx
.BoxSizer()
32 border
.Add(sizer
, 1, wx
.EXPAND|wx
.ALL
, 20)
36 #----------------------------------------------------------------------
38 def runTest(frame
, nb
, log
):
39 win
= TestPanel(nb
, log
)
42 #----------------------------------------------------------------------
46 overview
= """<html><body>
47 <h2><center>wx.animate.GIFAnimationCtrl</center></h2>
49 wx.animate.GIFAnimationCtrl is like a wx.StaticBitmap but is able to
50 display an animation by extracing frames from a multi-images GIF file.
57 if __name__
== '__main__':
60 run
.main(['', os
.path
.basename(sys
.argv
[0])] + sys
.argv
[1:])