Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is a better Tkinter geometry manager than .grid()
    text
    copied!<p><strong>My Complaint</strong></p> <p>I am currently delving deeper than "ever" before into the Tkinter GUI, and I have found the <code>.grid()</code> geometry manager to be inadequate for several reasons:</p> <ol> <li><p>The plots are based on the largest widget within them - this relativity leads to inaccuracy.</p></li> <li><p>In Windows 7, on Python 2.7.3, the program does not seem to heed my row numbers, instead preferring to use the order of the widgets.</p></li> </ol> <p><strong>My Code</strong></p> <p>I am currently working on a <em>really</em> basic text editor, and I want to have multiple buttons on the top of the frame. I have been unable to do this as my widgets are placed either to the far left or right of the massive textbox that dominates the center of the screen.</p> <pre><code>========Class __init__ Stuff============ def widget(self):#Place widgets here #Save Button self.saveButton = Button (self, text = "Save", command = self.saveMe) self.saveButton.grid(column = 0, row = 0, sticky = W) #Open Button self.openButton = Button (self, text = "Open", command = self.openMe) self.openButton.grid(column = 0, row = 1, sticky = W) #Area where you write self.text = Text (self, width = (root.winfo_screenwidth() - 20), height = (root.winfo_screenheight() - 10)) self.text.grid(row = 2) ==============Mainloop/Command Stuff============ </code></pre> <p><strong>My Question</strong></p> <p>Is there another way to use the <code>.grid()</code> geometry manager in a way that is more accurate, or should I be using another function altogether?</p> <p>Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload