From f9f6e9d8f7cc4161d48b7fa5d45c3a2af4a92cb7 Mon Sep 17 00:00:00 2001 From: MustafaHilmiYAVUZHAN <85347708+MustafaHilmiYAVUZHAN@users.noreply.github.com> Date: Mon, 8 Jul 2024 14:11:12 +0300 Subject: [PATCH 1/3] Update ctk_scrollable_dropdown.py --- CTkScrollableDropdown/ctk_scrollable_dropdown.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CTkScrollableDropdown/ctk_scrollable_dropdown.py b/CTkScrollableDropdown/ctk_scrollable_dropdown.py index a5e4f42..5e897e7 100644 --- a/CTkScrollableDropdown/ctk_scrollable_dropdown.py +++ b/CTkScrollableDropdown/ctk_scrollable_dropdown.py @@ -15,7 +15,7 @@ def __init__(self, attach, x=None, y=None, button_color=None, height: int = 200, scrollbar=True, scrollbar_button_hover_color=None, frame_border_width=2, values=[], command=None, image_values=[], alpha: float = 0.97, frame_corner_radius=20, double_click=False, resize=True, frame_border_color=None, text_color=None, autocomplete=False, - hover_color=None, **button_kwargs): + hover_color=None, topmost : bool = 0, **button_kwargs): super().__init__(master=attach.winfo_toplevel(), takefocus=1) @@ -50,7 +50,8 @@ def __init__(self, attach, x=None, y=None, button_color=None, height: int = 200, self.attach.winfo_toplevel().bind('', lambda e: self._withdraw() if not self.disable else None, add="+") self.attach.winfo_toplevel().bind("", lambda e: self._withdraw() if not self.disable else None, add="+") self.bind("", lambda e: self._withdraw() if not self.disable else None, add="+") - + if topmost: + self.attributes("-topmost", 1) self.attributes('-alpha', 0) self.disable = False self.fg_color = customtkinter.ThemeManager.theme["CTkFrame"]["fg_color"] if fg_color is None else fg_color From 947eb345df85ac0e94dc5241afc4ac7a729d8721 Mon Sep 17 00:00:00 2001 From: MustafaHilmiYAVUZHAN <85347708+MustafaHilmiYAVUZHAN@users.noreply.github.com> Date: Mon, 8 Jul 2024 14:14:22 +0300 Subject: [PATCH 2/3] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f9dd71d..d6f0e1e 100644 --- a/README.md +++ b/README.md @@ -120,3 +120,5 @@ root.mainloop() Show popup menu manually Note: if you are facing some issues then try using the `CTkScrollableDropdownFrame`. +_Credits goes to [MustafaHilmiYAVUZHAN](https://github.com/MustafaHilmiYAVUZHAN) For small development._ + From dd0cc53febb29a6209d29c1c7d6cc483090e069c Mon Sep 17 00:00:00 2001 From: MustafaHilmiYAVUZHAN <85347708+MustafaHilmiYAVUZHAN@users.noreply.github.com> Date: Mon, 8 Jul 2024 14:17:23 +0300 Subject: [PATCH 3/3] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d6f0e1e..edcdeff 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,7 @@ root.mainloop() | frame_border_color | change the border_color of the frame | | scrollbar | hide the scrollbar if required, default: True | | command | add the command when option is selected | +| topmost | always be on top | | _*Other Parameters_ | _All other parameters for ctkbutton or scrollbar can be passed in dropdownmenu_ | ## Methods @@ -120,5 +121,6 @@ root.mainloop() Show popup menu manually Note: if you are facing some issues then try using the `CTkScrollableDropdownFrame`. + _Credits goes to [MustafaHilmiYAVUZHAN](https://github.com/MustafaHilmiYAVUZHAN) For small development._