More intuitive descriptions of place, pack, and grid functions #2698
Unanswered
KoyoChatani
asked this question in
Q&A
Replies: 1 comment 1 reply
-
It's very simple. btn = ctk.CTkButton(root, text="Hello!", width=100) we configure the button, specify what it should be. And in the second btn.pack() we place the button. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
*First of all, please note that I am using a translation tool to write the following text, so there may be some inaccuracies.
More intuitive descriptions of place, pack, and grid functions
Example:
In this example…
The line
button.grid(row=0, column=0)
does not indicate which widget the button is placed on. This is because the button's master setting is defined in the button definition section.For frame1, where the button is placed, the column weight is set with
frame1.grid_columnconfigure(0, weight=1)
. Since this is also declared separately from the actual placement process, it is difficult to imagine how the widget will be placed without actually executing the code.My ideal would be something like this:
I understand that I should create a new class or function for the placement process to solve such problems, but due to my inexperience, I could not come up with a concrete implementation. I would like to ask for your help.
I hope this helps! If you need any further assistance, feel free to ask.
Beta Was this translation helpful? Give feedback.
All reactions