tkinter urgent help request

Martin Franklin mfranklin1 at gatwick.westerngeco.slb.com
Tue Jun 24 16:40:28 CEST 2003


idriss wrote:

>i want to scroll one frame's or canvas 's whole content (it will contain
>other subframes and subframes will contain bitmaps) I couldn't find
>where is my fault.  if you can find my fault or have some example codes
>like this please help me thanks from now.....
>
>
>
>from Tkinter import *
>import Image
>
>
>root = Tk()
>
>mainFrame = Canvas(root,width=400, height=420, bg='gray50',relief=RIDGE)
>mainFrame.pack(fill=BOTH,expand=1)
>
>scroll = Scrollbar(mainFrame)
>scroll.pack(side=RIGHT,expand=1,fill=BOTH)
>  
>


You just tried to pack the scrollbar inside a Canvas widget.  The 
scrollbar needs to be in the
root widget I would think :-)

    scroll = Scrollbar(root)
    scroll.pack(side=RIGHT,expand=1,fill=BOTH)



You just tried to pack the scroll



HTH
Martin







More information about the Python-list mailing list