0

I'm relatively new to coding in general and I'm wondering if there is a better way to position my GUI components. I'm using rows and columns, but it can be awkward as I have to use padx and pady to make my GUI look nice, is there an easier method of positioning these?

Example Code:

PageLabel=Label(Login,
            text="Login",
            font=('Arial Black',40),
            fg='white,
            bg='lightblue').grid(row=1,column=1,columnspan=4,padx=100)
sophros
  • 14,672
  • 11
  • 46
  • 75
  • try using `Grid geometry manager` – sahasrara62 Feb 26 '19 at 15:49
  • Choose on of the [Geometry Manager Grid, Pack, or Place - Geometry mixins](http://effbot.org/tkinterbook/tkinter-classes.htm) read [gui layout using frames and grid](https://stackoverflow.com/questions/34276663/tkinter-gui-layout-using-frames-and-grid/34277295#34277295) – stovfl Feb 26 '19 at 16:56
  • @prashantrana: they _are_ using the grid geometry manager. – Bryan Oakley Feb 26 '19 at 18:42
  • 1
    We can't answer a "best way" question without knowing what you're specifically trying to achieve. `grid` is the best way when you are laying things out in a grid. `pack` is the best way when laying out widgets side-to-side or top-to-bottom, `place` is best for absolute positioning, and some combination in conjunction with frames for organization is best for an application overall. All of the approaches have both strengths and weaknesses. – Bryan Oakley Feb 26 '19 at 18:43

0 Answers0