This code produces two canvases in a window. However Python does not stick them one to another but places a gap between them. This gap gets even wider when I resize the window.
from Tkinter import *
master.title('Python Canvas Testing')
settingscanvas = Canvas(master,bg="yellow")
datacanvas = Canvas(master,bd=1,bg="green")
for r in xrange(15):
Label(datacanvas, text='Label 2').grid()
## create main program window
window = Tk()
## create window container
app = App(window)
Both widgets have
expand set to
True,so they each are assigned some of the extra space. If you want only one to get the extra space, set
False for the other one. If you want them both to be given some of the extra space, be sure to set
fill to include the y direction.