title: Python/Tkinter: Cascading menus anchored at the right instead of the left
body: <p>The following code results in in a menubar with cascading menus that are anchored at the right instead of the left for unknown reason.</p>
  
  <pre><code>import tkinter as tk
  
  class Menubar(tk.Menu):
      def __init__(self, parent, *args, **kwargs):
          tk.Menu.__init__(self, parent, *args, **kwargs)
  
          filemenu = tk.Menu(self, tearoff=False)
          self.add_cascade(label="File",underline=0, menu=filemenu)
          filemenu.add_command(label="Exit", underline=0, command=None)
  
          testmenu = tk.Menu(self, tearoff=False)
          self.add_cascade(label="Test",underline=0, menu=testmenu)
          testmenu.add_command(label="First option", underline=0, command=None)
  
  
  class MainApplication(tk.Frame):
      def __init__(self, parent, *args, **kwargs):
          tk.Frame.__init__(self, parent, *args, **kwargs)
  
          menubar = Menubar(parent)
          parent.config(menu=menubar)
  
  if __name__ == "__main__":
      root = tk.Tk()
      MainApplication(root).pack(side="top", fill="both", expand=True)
      root.mainloop()
  </code></pre>