#๐Ÿ”’ Python GUI

6 messages ยท Page 1 of 1 (latest)

hard echoBOT
#

@real jasper

Python help channel opened

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.

real jasper
#

so i want to fix the position of the widget where it was originally was there, but when i search again the widget do not reset/go to its initial position

#
        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)
hard echoBOT
#

@real jasper

Python help channel closed

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.