I am working on writing a program for myself, and it is going well, but I had a lot of problems ensuring that all my widgets are placed where I want them to use the .pack()or parameters .grid().
.pack()
.grid()
After inspecting, I found that I could use the option instead .place(). Before I decided to use it .place(), I found countless posts on the forum that said, "Do not use .place()!".
.place()
I stood still with other options, so I decided to try it .place(). It turns out that .place()this is exactly what I need to fix my layout problems, and I just don’t understand why everyone hates it so much .place().
Is there something inherently wrong with .place()? Or do people prefer to use .pack()it .grid()for some practical reason besides ease of use?
There .placeis nothing wrong with it, although using gridit packgives you more convenient code. If you want to add a function, it placewill require that you change loads from absolute placements, for example, according to the button.
.place
grid
pack
place
If you need to use it, then use it, there is no real problem, it simply is not the most convenient for solving many problems. As you say, it is a matter of preference and ease of use.
: , .
, , , , place. , , stackoverflow, , .
place , , , . , , .
, , pack grid place, , tkinter Toplevel . place . Tkinter , .
Toplevel
, , place, . , . grid pack . - tk tkinter, , .
place . , , place . , , , place .
Source: https://habr.com/ru/post/1016117/More articles:Is there a way to use cfg (feature) validation for multiple statements? - rustSpring Download OAuth2 Single Sign Off (Exit) - javaNumber of firms per year using dplyr or datatable - rДолжны ли объекты datetime быть глубоко скопированы? - pythonNot a permanent element of initialization? - cHow to allow cannot import name pages (django / wagtail) - pythonPython function equivalent to R `pretty ()`? - pythonHow to use a multi-index map in pandas? - pythonHow to parse an excel file that will give me the data exactly the same as visually? - ruby | fooobar.comThe correct way to return a new line in Rust - rustAll Articles