MoreCustomTkinterWidgets 5.3.0__tar.gz → 5.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/LICENSE +1 -1
- {morecustomtkinterwidgets-5.3.0/src/MoreCustomTkinterWidgets.egg-info → morecustomtkinterwidgets-5.4.0}/PKG-INFO +2 -2
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/README.md +1 -1
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/pyproject.toml +1 -1
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Selector.py +14 -5
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/__init__.py +2 -2
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0/src/MoreCustomTkinterWidgets.egg-info}/PKG-INFO +2 -2
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/setup.cfg +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/AnimatedImage.py +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/AskDialog.py +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/AskValue.py +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/BetterCTkImage.py +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/DateSelector.py +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/FileExplorer.py +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/back_arrow_dark.png +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/back_arrow_light.png +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/error.png +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/file_dark.png +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/file_light.png +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/folder_dark.png +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/folder_light.png +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/forward_arrow_dark.png +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/forward_arrow_light.png +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/info.png +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/new_folder_dark.png +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/new_folder_light.png +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/warning.png +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Message.py +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Separator.py +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/SmoothFrame.py +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets.egg-info/SOURCES.txt +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets.egg-info/dependency_links.txt +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets.egg-info/requires.txt +0 -0
- {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: MoreCustomTkinterWidgets
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.4.0
|
|
4
4
|
Summary: A package containing more widgets for customtkinter
|
|
5
5
|
Author: Fastattack
|
|
6
6
|
License: MIT License
|
|
@@ -17,7 +17,7 @@ Requires-Dist: Pillow>=9.5.0
|
|
|
17
17
|
Dynamic: license-file
|
|
18
18
|
|
|
19
19
|
# MoreCustomTkinterWidgets
|
|
20
|
-
By Fastattack, 2024-
|
|
20
|
+
By Fastattack, 2024-2026
|
|
21
21
|
|
|
22
22
|
[](https://pypi.org/project/MoreCustomTkinterWidgets)
|
|
23
23
|
[](https://github.com/fastattackv/MoreCustomTkinterWidgets)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# MoreCustomTkinterWidgets
|
|
2
|
-
By Fastattack, 2024-
|
|
2
|
+
By Fastattack, 2024-2026
|
|
3
3
|
|
|
4
4
|
[](https://pypi.org/project/MoreCustomTkinterWidgets)
|
|
5
5
|
[](https://github.com/fastattackv/MoreCustomTkinterWidgets)
|
|
@@ -3,12 +3,13 @@ from customtkinter import ThemeManager
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
class Selector(ctk.CTkFrame):
|
|
6
|
-
def __init__(self, master, names_list: list[str], multiple_choices=True, *args, **kwargs):
|
|
6
|
+
def __init__(self, master, names_list: list[str], multiple_choices=True, search_mode: str="fuzzy", *args, **kwargs):
|
|
7
7
|
"""Selector widgets to select options in a list of options. Includes a search bar to find different elements faster.
|
|
8
8
|
|
|
9
9
|
:param master: master window for the widget
|
|
10
10
|
:param names_list: list of the possible options, they should all be different
|
|
11
11
|
:param multiple_choices: Optional: if set to False, the user will be allowed to select only one item (default=True)
|
|
12
|
+
:param search_mode: Optional: if set to "exact": the search will only show the items that start with exactly the given string, if set to "fuzzy": the search will show items that contain the search as a substring (default="fuzzy")
|
|
12
13
|
:param args: args for the CTkFrame widget
|
|
13
14
|
:param kwargs: kwargs for the CTkFrame widget
|
|
14
15
|
"""
|
|
@@ -33,6 +34,13 @@ class Selector(ctk.CTkFrame):
|
|
|
33
34
|
self.selected_indexes = []
|
|
34
35
|
self.multiple_choices = multiple_choices
|
|
35
36
|
|
|
37
|
+
if search_mode == "exact":
|
|
38
|
+
self.exact_search = True
|
|
39
|
+
elif search_mode == "fuzzy":
|
|
40
|
+
self.exact_search = False
|
|
41
|
+
else:
|
|
42
|
+
raise ValueError(f"The given search_mode is incorrect: {search_mode}")
|
|
43
|
+
|
|
36
44
|
if len(set(names_list)) == len(names_list): # not 2 times the same item
|
|
37
45
|
for index in range(len(names_list)):
|
|
38
46
|
self.checkboxes.append(ctk.CTkCheckBox(self.checkboxes_frame, text=names_list[index], command=lambda a=index: self._selection(a)))
|
|
@@ -64,12 +72,13 @@ class Selector(ctk.CTkFrame):
|
|
|
64
72
|
""" Internal method: modifies the search """
|
|
65
73
|
value = self.search_var.get()
|
|
66
74
|
row = 0
|
|
67
|
-
for
|
|
68
|
-
|
|
69
|
-
|
|
75
|
+
for i in range(len(self.checkboxes)):
|
|
76
|
+
text = self.checkboxes[i].cget("text")
|
|
77
|
+
if (self.exact_search and text.startswith(value)) or (not self.exact_search and value in text.lower()):
|
|
78
|
+
self.checkboxes[i].grid(row=row, column=0, pady=3, sticky="w")
|
|
70
79
|
row += 1
|
|
71
80
|
else:
|
|
72
|
-
self.checkboxes[
|
|
81
|
+
self.checkboxes[i].grid_forget()
|
|
73
82
|
self._reset_scroll()
|
|
74
83
|
|
|
75
84
|
def _empty_search(self):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: MoreCustomTkinterWidgets
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.4.0
|
|
4
4
|
Summary: A package containing more widgets for customtkinter
|
|
5
5
|
Author: Fastattack
|
|
6
6
|
License: MIT License
|
|
@@ -17,7 +17,7 @@ Requires-Dist: Pillow>=9.5.0
|
|
|
17
17
|
Dynamic: license-file
|
|
18
18
|
|
|
19
19
|
# MoreCustomTkinterWidgets
|
|
20
|
-
By Fastattack, 2024-
|
|
20
|
+
By Fastattack, 2024-2026
|
|
21
21
|
|
|
22
22
|
[](https://pypi.org/project/MoreCustomTkinterWidgets)
|
|
23
23
|
[](https://github.com/fastattackv/MoreCustomTkinterWidgets)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|