title: How to center Button using grid?
body: <p>I'm trying to center the button widget in a tkinter frame window using <code>grid()</code>. I have tried several solutions included <code>weights</code> but none of them center the button widget with text "Choose files". Its either left or right sticked. How could I go about doing this?</p>
  
  <p>I don't want to use <code>pack()</code>, by the way. I would like to keep using <code>grid()</code>.</p>
  
  <pre><code>class MyFrame(Frame):
      def __init__(self):
          Frame.__init__(self)
          self.master.title("PDF Merger v0.1")
          self.filenamesopen = []
          self.grid(sticky=W + E + N + S)
  
          self.button = Button(self, text="Choose files", command=self.load_files, width=10)
          self.button.grid(row=0, column=0,sticky=E+W)
  
          self.button = Button(self, text="Merge", command=self.merge_files, width=10)
          self.button.grid(row=1, column=0, sticky=W)
          self.labelframe = LabelFrame(self, text="Files to merge:")
          self.labelframe.grid(row=2, column=0, sticky=W)
          self.left = Label(self.labelframe, text="")
          self.left.grid(row=3, column=0, sticky=W)
      def load_files(self):
          try:
              self.filenamesopen = filedialog.askopenfilenames(initialdir="/", title="Choose files to merge...",
                                                  filetypes=(("pdf", "*.pdf"), ("All files", "*.*")))
              filenames = [os.path.split(file)[1] for file in self.filenamesopen]
              self.left.configure(text="\n".join(filenames))
          except:
              showerror("Open Source File", "Failed to read files\n")
  
      def merge_files(self):
          self.merger = PdfFileMerger()
          try:
              for pdf in self.filenamesopen:
                  self.merger.append(open(pdf, 'rb'), import_bookmarks=False)
          except:
              showerror("Merger Error", "Failed to merge files\n")
              return
          self.save_files()
      def save_files(self):
          try:
              self.filenamesave = filedialog.asksaveasfilename(initialdir="/", title="Save as...",
                                       filetypes=(("pdf", "*.pdf"), ("All files", "*.*")),
                                                           defaultextension=".pdf")
              with open(self.filenamesave, 'wb') as fout:
                  self.merger.write(fout)
          except:
              showerror("Save Source File", "Failed to save file\n")
  if __name__ == "__main__":
      MyFrame().mainloop()
  </code></pre>