title: scrollregion in Canvas in Tkinter?
body: <p>I wrote a program in Python. But I wonder if there might be shorter way of doing this. Especially about "Canvas", "Frame", "LabelFrame" and "Label", is there any other way to make "scrollregion" automatically (rather than I wrote, and if possible natural way in Tkinter) </p>
  
  <p>Here is the code:</p>
  
  <pre><code>from tkinter import *
  dict = {}
  Liste = ["bir","iki","üç","4",5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
  a = 1
  
  ####### ekleme basi ##################################################
  pencere = Tk()
  pencere.geometry("{0}x{1}".format(100, 100))
  
  labelFrame = LabelFrame(pencere, width = 100, height = 100)
  labelFrame.pack(side="left",fill=BOTH)
  canvas = Canvas(labelFrame,relief=SUNKEN)
  #canvas.config(scrollregion=(0,0,300,1000))    # halloldu =)
  
  scrollbar = Scrollbar(labelFrame)
  scrollbar.config(command=canvas.yview)
  canvas.config(yscrollcommand=scrollbar.set)
  scrollbar.pack(side="right",fill=Y)
  canvas.pack(side="left",expand=YES,fill=BOTH)
  
  frame = Frame(canvas,width=100,height=100)
  frame.pack(side="top",fill=BOTH)
  canvas.create_window(0,0,window=frame, anchor="nw")
  ####### ekleme sonu ##################################################
  
  bas = [0, 0, 0, 100]
  for i in Liste:
      dict["a%s"%a] = Label(frame, text=i)    # "frame" ekledim
      dict["a%s"%a].grid(row=a)
      canvas["scrollregion"] = "%d %d %d %d" %(bas[0], bas[1], bas[2], bas[3])
      bas[3] += 16    # "scrollregion" i dinamik olarak arttir (degistirebilirsiniz)
      a += 1
  
  
  mainloop() 
  </code></pre>
  
  <p>Note: English is my second language and I don't know very well, so sorry.</p>