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.
Files changed (34) hide show
  1. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/LICENSE +1 -1
  2. {morecustomtkinterwidgets-5.3.0/src/MoreCustomTkinterWidgets.egg-info → morecustomtkinterwidgets-5.4.0}/PKG-INFO +2 -2
  3. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/README.md +1 -1
  4. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/pyproject.toml +1 -1
  5. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Selector.py +14 -5
  6. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/__init__.py +2 -2
  7. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0/src/MoreCustomTkinterWidgets.egg-info}/PKG-INFO +2 -2
  8. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/setup.cfg +0 -0
  9. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/AnimatedImage.py +0 -0
  10. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/AskDialog.py +0 -0
  11. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/AskValue.py +0 -0
  12. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/BetterCTkImage.py +0 -0
  13. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/DateSelector.py +0 -0
  14. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/FileExplorer.py +0 -0
  15. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/back_arrow_dark.png +0 -0
  16. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/back_arrow_light.png +0 -0
  17. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/error.png +0 -0
  18. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/file_dark.png +0 -0
  19. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/file_light.png +0 -0
  20. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/folder_dark.png +0 -0
  21. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/folder_light.png +0 -0
  22. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/forward_arrow_dark.png +0 -0
  23. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/forward_arrow_light.png +0 -0
  24. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/info.png +0 -0
  25. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/new_folder_dark.png +0 -0
  26. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/new_folder_light.png +0 -0
  27. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Images/warning.png +0 -0
  28. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Message.py +0 -0
  29. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/Separator.py +0 -0
  30. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets/SmoothFrame.py +0 -0
  31. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets.egg-info/SOURCES.txt +0 -0
  32. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets.egg-info/dependency_links.txt +0 -0
  33. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets.egg-info/requires.txt +0 -0
  34. {morecustomtkinterwidgets-5.3.0 → morecustomtkinterwidgets-5.4.0}/src/MoreCustomTkinterWidgets.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024-2025 Fastattack
3
+ Copyright (c) 2024-2026 Fastattack
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MoreCustomTkinterWidgets
3
- Version: 5.3.0
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-2025
20
+ By Fastattack, 2024-2026
21
21
 
22
22
  [![Pypi](https://img.shields.io/pypi/v/MoreCustomTkinterWidgets?label=Pypi)](https://pypi.org/project/MoreCustomTkinterWidgets)
23
23
  [![GitHub - Total commits](https://img.shields.io/github/commit-activity/t/fastattackv/MoreCustomTkinterWidgets?label=Total%20GitHub%20commits&color=darkblue)](https://github.com/fastattackv/MoreCustomTkinterWidgets)
@@ -1,5 +1,5 @@
1
1
  # MoreCustomTkinterWidgets
2
- By Fastattack, 2024-2025
2
+ By Fastattack, 2024-2026
3
3
 
4
4
  [![Pypi](https://img.shields.io/pypi/v/MoreCustomTkinterWidgets?label=Pypi)](https://pypi.org/project/MoreCustomTkinterWidgets)
5
5
  [![GitHub - Total commits](https://img.shields.io/github/commit-activity/t/fastattackv/MoreCustomTkinterWidgets?label=Total%20GitHub%20commits&color=darkblue)](https://github.com/fastattackv/MoreCustomTkinterWidgets)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "MoreCustomTkinterWidgets"
7
- version = "5.3.0"
7
+ version = "5.4.0"
8
8
  dependencies = [
9
9
  "customtkinter>=5.2.1",
10
10
  "Pillow>=9.5.0",
@@ -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 x in range(len(self.checkboxes)):
68
- if self.checkboxes[x].cget("text").startswith(value):
69
- self.checkboxes[x].grid(row=row, column=0, pady=3, sticky="w")
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[x].grid_forget()
81
+ self.checkboxes[i].grid_forget()
73
82
  self._reset_scroll()
74
83
 
75
84
  def _empty_search(self):
@@ -10,5 +10,5 @@ from .Separator import Separator
10
10
  from .DateSelector import Date, DateSelector, DateSelectorButton
11
11
 
12
12
 
13
- _version = "5.3.0"
14
- __version__ = "5.3.0"
13
+ _version = "5.4.0"
14
+ __version__ = "5.4.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MoreCustomTkinterWidgets
3
- Version: 5.3.0
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-2025
20
+ By Fastattack, 2024-2026
21
21
 
22
22
  [![Pypi](https://img.shields.io/pypi/v/MoreCustomTkinterWidgets?label=Pypi)](https://pypi.org/project/MoreCustomTkinterWidgets)
23
23
  [![GitHub - Total commits](https://img.shields.io/github/commit-activity/t/fastattackv/MoreCustomTkinterWidgets?label=Total%20GitHub%20commits&color=darkblue)](https://github.com/fastattackv/MoreCustomTkinterWidgets)