TomSchimansky / TomSchimansky/CustomTkinter
self.focus_set() and self.grab_set() in ctkoptionmenu make bug my app :(
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
i have to wirte this line like comment in ctkoptionmenu.py becuz when i click to see the menu, all of my app bug.
# self.grab_set()
# self.focus_set()
see with wiki code.
version = "5.1.2"
entry=ctk.CTkOptionMenu(self,
values=layer_values,
command=self.optionmenu_callback)
entry.grid(row=count,column=1)
def _on_enter(self, event=0):
if self._hover is True and self._state == tkinter.NORMAL and len(self._values) > 0:
# set color of inner button parts to hover color
self._canvas.itemconfig("inner_parts_right",
outline=self._apply_appearance_mode(self._button_hover_color),
fill=self._apply_appearance_mode(self._button_hover_color))
# self.grab_set()
# self.focus_set()
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in ctkoptionmenu.py at _on_enter, using the provided CustomTkinter 5.1.2 CTkOptionMenu example to reproduce the failure with self.grab_set() and self.focus_set() enabled. Compare the menu behavior with those calls active and commented out, then verify that opening the menu no longer breaks the application while its expected interaction remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100