Skip to content

Instantly share code, notes, and snippets.

@emad-elsaid
Created June 9, 2010 08:56
Show Gist options
  • Save emad-elsaid/431242 to your computer and use it in GitHub Desktop.
Save emad-elsaid/431242 to your computer and use it in GitHub Desktop.
import wx
from wx.lib.floatcanvas.FloatCanvas import FloatCanvas
class FormFiche(wx.Frame):
def __init__(self):
wx.Frame.__init__(self,None,-1,"Title",size=wx.Size(300,400))
scroll=wx.ScrolledWindow(self)
x = 1000
y = 20000
canvas = FloatCanvas(scroll,size=wx.Size(x,y))
#x,y = canvas.GetBestSize()
scroll.SetScrollbars(20,20,x/20,y/20)
self.Show(1)
myapp=wx.PySimpleApp()
FormFiche()
myapp.MainLoop()
@emad-elsaid
Copy link
Author

scroll.SetScrollbars(20,20,x/20,y/20)
first paramter: 20 pixel per step for x
2nd paramter: 20 blah blah blah for y
3rd : number of units for x
4th : number of units for y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment