13.07.2015 Views

The wxPython tutorial

The wxPython tutorial

The wxPython tutorial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>wxPython</strong> widgetshttp://www.zetcode.com/wxpython/widgets/displayed automatically.Figure: scrolledwindow.py#!/usr/bin/python# scrolledwindow.pyimport wxclass ScrolledWindow(wx.Frame):def __init__(self, parent, id, title):wx.Frame.__init__(self, parent, id, title, size=(500, 400))sw = wx.ScrolledWindow(self)bmp = wx.Image('images/aliens.jpg',wx.BITMAP_TYPE_JPEG).ConvertToBitmap()wx.StaticBitmap(sw, -1, bmp)sw.SetScrollbars(20, 20, 55, 40)sw.Scroll(50,10)self.Centre()self.Show()app = wx.App()ScrolledWindow(None, -1, 'Aliens')app.MainLoop()24 de 29 27/04/2008 1:04

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!