Try different usages of creating the animation and control

This commit is contained in:
Robin Dunn
2020-04-06 12:52:43 -07:00
parent 4dcd9a7114
commit 6037779151

View File

@@ -32,8 +32,15 @@ class TestPanel(wx.Panel):
sizer = wx.FlexGridSizer(cols=3, hgap=5, vgap=5)
for name in GIFNames:
ctrl = AnimationCtrl(self)
ctrl.LoadFile(opj(name))
if False:
ctrl = AnimationCtrl(self)
ani = ctrl.CreateAnimation()
ani.LoadFile(opj(name))
ctrl.SetAnimation(ani)
else:
ctrl = AnimationCtrl(self)
ctrl.LoadFile(opj(name))
ctrl.SetBackgroundColour(self.GetBackgroundColour())
ctrl.Play()
sizer.Add(ctrl, 0, wx.ALL, 10)