#๐ Help tkinter
12 messages ยท Page 1 of 1 (latest)
@fallen wing
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.
when i search something it become like this, and i want the widgets to reset to its initial position.
this is the initial position
thank you for anyone would help me!
Looks like you have a frame above the widgets which you just empty.
Maybe set the coords back, or however you pack/place/grid those widgets
def search_again(self):
# Clear previous results
self.result_text.set("") # Clear any previous results
self.image_label.config(image=None) # Clear the displayed image
self.image_label.photo = None # Clear image reference
self.canvas.yview_moveto(0) # Scroll back to the top of the canvas
# Hide the "Search Again" button
self.search_again_button.pack_forget()
# Reset the combobox to its default value
self.style_combobox.set("Choose your Color")
# Clear the hardness entry
self.hardness_entry.delete(0, tk.END)
# Repack the search widgets in the original order and with minimal padding
# Pack all search widgets together with minimal padding and consistent anchor
self.color_label.pack(anchor='center')
self.style_combobox.pack(anchor='center')
self.hardness_label.pack(anchor='center')
self.hardness_entry.pack(anchor='center')
self.search_button.pack(anchor='center')
# Add the search again button back to the list of search widgets for later use
self.search_widgets.append(self.search_again_button)
it does not fix anything ๐ฆ
Im not sure if self.result_text.set("") will automatically make it smaller again.
hmm, ive tried anything i dont know how to fix it ๐ฆ
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.