title: Tkinter Canvas set to size of it's container
body: <p>I have a question about using the Tkinter Canvas object for making a GUI in Python.  </p>
  
  <p>When creating your frame object you give it the width and height you would like it to have.  Is there a way to detect the size of it's container and use that for it's width and height?  </p>
  
  <p>For example lets say you wanted to created a Canvas that would always take up space equal to the entire Top Right Corner of the screen, even if your window was to be resized, or you were to use the Frame it's contained in in another program that maybe has another Frame taking up other screen space.</p>
  
  <p>Take this for example:</p>
  
  <pre><code>import tkinter as tk
  
  root = tk.Tk()
  root.geometry("800x480")
  container = tk.Frame(root, bg = "yellow")
  container.pack(expand = True, fill = "both")
  drawArea = tk.Canvas(container, bg = "red")
  drawArea.pack()
  </code></pre>
  
  <p>In the above code the canvas will not take up the entirety of the yellow frame it is place in.  I know if I want to set it to be the full size of the yellow frame I add <code>expand = True, fill = "both"</code> to the <code>.pack()</code> statement.  However what if I only want it to be 2/3 of the Frame?  Or half the width and height of the frame?  Is it possible to do that?</p>
  
  <p>Maybe I suck at Googling, but I can't seem to find any info on this online :\</p>