i couldnt figure out why since four days tried many things ..even AI...now only human as capable as you can save me...code:https://paste.pythondiscord.com/CXWQ ... please help me with my school project. look at the pics i attached notice how it goes up with respect to the order button.
#π i need your time pls......everytime i press the proceed button the cart_frame shrinks.
27 messages Β· Page 1 of 1 (latest)
@valid depot
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.
Closes after a period of inactivity, or when you send !close.
Should proceed be calling room_for_rest?
the the problem can be mainly from cart_frame, right_frame, buttonorder , order, proceed.....feel free to look around the code for more
the room_for_rest is not causing the problem i tested it ....by commenting it and rerunning the code
its 3 am at my place please tell me every possible fix .......im going to sleep and please help me if you see me here with same post 12 hrs later
PLEASE
π₯Ί
im in kinda desperate need
It looks like the "Order" mode (left screenshot) has either the button aligned to the bottom of the frame, or the empty card autoexpanding to all the free space.
And the "Proceed" mode looks like the cart area has a fixed size and the button is just below it ,instead of being aligned to the bottom of the frame.
I'm not sure where this alignment happens in your code.
Since "Cart" is eft aligned in the left shot and centred in the right shot, I suspect you lay out that "Order for" right panel totally differently when there are items in the cart and when there are not?
Perhaps there is a way to hide certain frames instead of destroying them constantly?
(I'm no expert in tkinter, just offering suggestions)
IIRC Tk doesn't lend itself to "hidden" widgets. (Versus say an HTML document with a tag with display:none.) You put the widget there or not.
I think the OP's layout is just differently specified for the two modes. They want to align their button with the "south" of the enclosing frame, if I'm reading their concern correctly.
I suspect that if it were me I'd have the same widgets i.e. just one frame and cart/buttons, but just change the label on the button.
ok i read all of it can you please summerise the changes i should make to the code please
I'm wondering if it is as simple as your buttonorder.grid call on line 583. Try sticking it to the "s" (south) of the frame, maybe sticky="ews".
Okay I will try.. Anything more??
Also one more question... Why would a button shift a frame... If it's placed in a different row
?
on this line, try changing corner radius to 0 to match previous mentions
cart_item_frame = ctk.CTkFrame(cart_frame, fg_color="#404040", corner_radius=10)
https://chatgpt.com/share/673d2a3d-fe44-800d-b080-81fc916b0375
Maybe this might help, im not sure
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.