Re: tkinter urgent help request

Discussion in 'Python' started by Martin Franklin, Jun 24, 2003.

  1. 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
    Martin Franklin, Jun 24, 2003
    #1
    1. Advertising

  2. Eric Brunel <> wrote in message news:<bd9va0$o4j$>...
    > from Tkinter import *
    >
    > root = Tk()
    >
    > cnv = Canvas(root, width=400, height=400)
    > cnv.pack(fill=BOTH,expand=1)
    >
    > scroll = Scrollbar(cnv, command=cnv.xview, orient=HORIZONTAL)
    > cnv.create_window(200, 400, anchor=S, window=scroll, width=400)
    > cnv.configure(xscrollcommand=scroll.set, scrollregion=(0, 0, 1000, 1000))
    >
    > root.mainloop()
    > ----------------------------
    >
    > One of the most useless script I ever wrote... Sorry: it's a bit late here...



    Haha! That self-scrollbar belongs in comp.lang.python.humor (which
    of course doesn't exist, but given the namesake of the language, maybe
    it should...)
    Lonnie Princehouse, Jun 24, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Birtle
    Replies:
    2
    Views:
    1,996
    John Saunders
    Oct 16, 2003
  2. Eric Brunel

    Re: tkinter urgent help request

    Eric Brunel, Jun 24, 2003, in forum: Python
    Replies:
    1
    Views:
    698
    Eric Brunel
    Jun 24, 2003
  3. Jeff Epler
    Replies:
    0
    Views:
    496
    Jeff Epler
    Aug 20, 2004
  4. Jeff Epler
    Replies:
    0
    Views:
    444
    Jeff Epler
    Aug 23, 2004
  5. Daku
    Replies:
    3
    Views:
    338
    kopik
    Dec 31, 2009
Loading...

Share This Page