• Could not connect to Twitter

Using wx.Image & wx.StaticBitmap

Now we actually load and display an Image! We use a wx.Image which reads a graphic image from our hard-drive.

First we show the image’s dimensions in the status-bar using .SetStatusText(…). Next we use the new ShowBitmap(self) function to convert the Image to a wx.StaticBitmap which is shown inside the Panel. We ask the Frame to resize itself to fit the picture and also to center itself on-screen.

This is one of our Club ShowMeDo Python tutorials, these build upon our free wxPython tutorials which live with our 179 Python tutorials. The source code for this episode is freely available (they all are) further down the video’s page.

“Really quite enjoying this series – coming back everyday to see if another part has been uploaded!” – John Montgomery

“…Nevertheless, this is still one of the best tutorial videos I’ve ever seen and trust me: I’ve seen lot’s of ‘em!” – Lucas Holland

Please share:
  • DZone
  • del.icio.us
  • Reddit
  • Furl
  • Ma.gnolia
  • email
  • StumbleUpon
  • Technorati
  • TwitThis
  • Slashdot
If you enjoyed this post, make sure you subscribe to my RSS feed!

Related posts:

  1. wx.FileDialog and CreateStatusBar for our wx Image Viewer
  2. Exercise 1 for the wxPython Image Viewer – adding a Mirror function
  3. Menus and Binding for wxPython Image Viewer
  4. Building a wxPython Image Viewer – 8th episode
  5. Solution 1 – Walk-through of adding the Mirror Image wxPython function

Comments are closed.