Why do people say: "Do not use place ()"?

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().

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()!".

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?

+7
source share
2 answers

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.

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.

: , .

+4

, , , , place. , , stackoverflow, , .

place , , , . , , .

, , pack grid place, , tkinter Toplevel . place . Tkinter , .

, , place, . , . grid pack . - tk tkinter, , .

place . , , place . , , , place .

+4

Source: https://habr.com/ru/post/1016117/


All Articles