Skip to content

Commit

Permalink
Try different usages of creating the animation and control
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinD42 committed Apr 6, 2020
1 parent 4dcd9a7 commit 6037779
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions demo/AnimateCtrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ def __init__(self, parent, log):

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)
Expand Down

0 comments on commit 6037779

Please sign in to comment.