[Video] wxFormBuilder: Build a Python Gif Viewer Part 11 – Gif Animator Code
In this tutorial you add code that will load the Gif file in the wx.animate.AnimationCtrl and then you can see the animation.
You will also learn how to set the minumum width or height of the frame.
1 2 3 4 5 6 7 8 9 10 11 |
import wx.animate def listBoxGifilesOnListBox( self, event ): try: selGif = event.GetString() gifile = os.path.join(self.GifPath,selGif) self.animCtrlGifs.LoadFile(gifile, type=wx.animate.ANIMATION_TYPE_ANY) self.animCtrlGifs.Play() except: print "Listbox error" #event.Skip() |
By adding this code you will be able to see the gif animation.
But we need to fix the gap between the listbox and the gif animation widget. This will be in the next tutorial and the full code will be provided.
If you have any questions or comments please post them on my YouTube video
Also,If you liked this video click the like button and subscribe to Python Bytes channel
Next and Final Tutorial: [Video] wxFormBuilder: Build a Python Gif Viewer – 12 Final Code