title: Python tkinter. How to get height of Menu
body: <p>I am trying to set the minimum size of the window.</p>
  
  <p>I followed the solution posted on <a href="https://stackoverflow.com/questions/10448882/how-do-i-set-a-minimum-window-size-in-tkinter">How do I set a minimum window size in tkinter?</a></p>
  
  <p>However, that doesn't take account of the height of the Menu I have.</p>
  
  <p>The Menu code I have is:</p>
  
  <pre><code>menubar = tk.Menu(self)
  
  menu = tk.Menu(menubar, tearoff=0)
  menu.add_command(label="Change user name", \
                   command=self.prompt_new_name)
  menu.add_separator()
  menu.add_command(label="Exit", command=self.close_app)
  menubar.add_cascade(label="Menu", menu=menu)
  self.master.config(menu=menubar)
  </code></pre>
  
  <p>And the way how I am setting the minimum size is:</p>
  
  <pre><code>master = self.master
  master.update()
  print(master.winfo_height())
  print(menubar.winfo_height())
  master.minsize(master.winfo_width(), master.winfo_height())
  </code></pre>
  
  <p>master.winfo_height() looks like it returns the height of the window as if there was no Menu widget. I tried printing the height of menubar but it returns 1.</p>
  
  <p>How do I get the height of the window including the menu or only get the height of the menu separately so I can add it to the master.winfo_height() and set that as the minsize?</p>