#๐ How do i remove the size of this
142 messages ยท Page 1 of 1 (latest)
@limber crest
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
i want it to be size like this
You need to remove the dimensions specified in your code
can i dm u?
Share it here pls
i cant dm u
can dm me pls
Share it here pls
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
i pasted it
Share the link after you pasted and save it
Do you see line 26?
yea i tried it
What did you try?
but it just hide the login button
the geometry sht
i did 200x150
it stays like this
i want to move the login button
and the register
to look like this
this one
grid them in the same row
right now you have row 2 for the login and row 3 for the register
What did you change?
Did you also change the columnspan?
what did u do
I have this accent color thing
and the column
how do i make them like this
the login and register size
its well fitted the box
yeahh but equal size
that's going to be a bit trickier than just changing a few values
you'll need frames
can u show me this pls
this has space
It would require a far amount of rewriting then
This is achievable with just a few changes
like how
cand u send me ur eited script
i got error
What's the error?
button_frame.grid(row=2, column=0, columnspan=2, sticky="ew")
line 61
PS C:\Users\geral> & C:/Users/geral/AppData/Local/Programs/Python/Python312/python.exe "c:/Users/geral/Downloads/import tkinter as tk.py"
Traceback (most recent call last):
File "c:\Users\geral\Downloads\import tkinter as tk.py", line 61, in <module>
button_frame.grid(row=2, column=0, columnspan=2, sticky="ew")
File "C:\Users\geral\AppData\Local\Programs\Python\Python312\Lib\tkinter_init_.py", line 2569, in grid_configure
self.tk.call(
_tkinter.TclError: cannot use geometry manager grid inside . which already has slaves managed by pack
PS C:\Users\geral>
_tkinter.TclError: cannot use geometry manager grid inside . which already has slaves managed by pack
PS C:\Users\geral>
That's the error
you cannot use pack and grid in the same frame
can you show your code?
!paste
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
do you understand what a frame is?
no cause i only watch yt for that
im no coder
thats why i ask help here
but thanks tho
yes, but just be aware these help threads are not for you to fix your code for you
we're here to help you learn so you can fix it yourself
a Frame is basically a container that can hold other widgets
do you know what a widget is?
a widget is any UI element, like a button, or an entry
a frame itself is also a widget, but it's more of an organizational thing
I'm self taught in python, I went to college for animation
cause im grade 10 im planning to take coding
ok so tkinter uses 2 types of "geometry manager"
this determines how widgets are added into a frame
we can "pack" or we can "grid"
pack simply places one object next to the previous one based on the order you pack them
do you know what a grid is (in non python terms)?
its like grid paper
?
that determines how many columns your widget takes up
by default, they only take up 1 row, and 1 column
oki thanks you brother
i am going to figure things now
ok, now tkinter does not allow us to use grid and pack together in the same frame
if we have a frame, and we grid something into that frame, then we can't also pack something into that frame
but each frame can use its own manager, so we can pack a frame into the window, and then grid things into that frame
it might sound a bit confusing
but each frame is basically its own little organizational element
ok thank you i just copy ur saying
in my notepad
just incase i read it again
tyy
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.
