CTkPlus 0.1.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.
@@ -0,0 +1,65 @@
1
+ import customtkinter as tk
2
+
3
+ class CTkEntryButton(tk.CTkFrame):
4
+ def __init__(self, master, command=None, text='✔️', placeholder_text=None, bg_color="transparent", fg_color="transparent", **kwargs):
5
+ super().__init__(master, bg_color=bg_color,fg_color=fg_color, **kwargs)
6
+
7
+ self.entry = tk.CTkEntry(self, placeholder_text=placeholder_text)
8
+ self.entry.pack(side='left')
9
+
10
+ self.button = tk.CTkButton(self,width=5,text=text,font=('Classic',15),command=command)
11
+ self.button.pack(padx=2,side='left')
12
+
13
+ def get(self):
14
+ return self.entry.get()
15
+
16
+ class CTkSpinBox(tk.CTkFrame):
17
+ def __init__(self, master,command=lambda *args: None,start_num=0,bg_color="transparent", fg_color="transparent", **kwargs):
18
+ super().__init__(master,bg_color=bg_color,fg_color=fg_color)
19
+
20
+ self.string = tk.StringVar()
21
+ self.string.trace_add('write',command)
22
+
23
+ self.entry = tk.CTkEntry(self,textvariable=self.string,corner_radius=0)
24
+ self.entry.pack(side='left')
25
+ self.entry.insert(0,str(start_num))
26
+
27
+ self.frame = tk.CTkFrame(self)
28
+ self.frame.pack(side='left')
29
+
30
+ self.button = tk.CTkButton(self.frame,width=15,height=14,text='▲',font=('Impact',5,'bold'),corner_radius=0,command=lambda: self.plus(1))
31
+ self.button.pack(side='top',pady=0)
32
+
33
+ self.button2 = tk.CTkButton(self.frame,width=15,height=14,text='▼',font=('Impact',5,'bold'),corner_radius=0,command=lambda: self.minus(1))
34
+ self.button2.pack(side='bottom',pady=0)
35
+
36
+ def plus(self,*args):
37
+ try:
38
+ r = self.entry.get()
39
+ self.entry.delete(0,tk.END)
40
+ self.entry.insert(0,str(int(r)+sum(args)))
41
+ return self.entry.get()
42
+ except:
43
+ pass
44
+
45
+ def minus(self, *args):
46
+ try:
47
+ r = self.entry.get()
48
+ if int(r) != 0:
49
+ self.entry.delete(0,tk.END)
50
+ self.entry.insert(0,str(int(r)-sum(args)))
51
+ return self.entry.get()
52
+ except:
53
+ pass
54
+
55
+ def get(self):
56
+ return self.entry.get()
57
+
58
+ class CTkEntry(tk.CTkEntry):
59
+ def __init__(self, master, width = 140, height = 28, corner_radius = None, border_width = None, bg_color = "transparent", fg_color = None, border_color = None, text_color = None, placeholder_text_color = None, textvariable = None, placeholder_text = None, font = None, command=lambda *args: None, **kwargs):
60
+ super().__init__(master, width, height, corner_radius, border_width, bg_color, fg_color, border_color, text_color, placeholder_text_color, textvariable, placeholder_text, font, **kwargs)
61
+
62
+ self.string = tk.StringVar()
63
+ self.string.trace_add('write',command)
64
+ self.configure(textvariable=self.string)
65
+
@@ -0,0 +1 @@
1
+ from .CTkPlus import CTkEntryButton, CTkSpinBox, CTkEntry
@@ -0,0 +1,5 @@
1
+ Metadata-Version: 2.4
2
+ Name: CTkPlus
3
+ Version: 0.1.0
4
+ Summary: vidgets for customtkinter
5
+ Requires-Dist: customtkinter
@@ -0,0 +1,8 @@
1
+ pyproject.toml
2
+ CTkPlus/CTkPlus.py
3
+ CTkPlus/__init__.py
4
+ CTkPlus.egg-info/PKG-INFO
5
+ CTkPlus.egg-info/SOURCES.txt
6
+ CTkPlus.egg-info/dependency_links.txt
7
+ CTkPlus.egg-info/requires.txt
8
+ CTkPlus.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ customtkinter
@@ -0,0 +1 @@
1
+ CTkPlus
ctkplus-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,5 @@
1
+ Metadata-Version: 2.4
2
+ Name: CTkPlus
3
+ Version: 0.1.0
4
+ Summary: vidgets for customtkinter
5
+ Requires-Dist: customtkinter
@@ -0,0 +1,11 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "CTkPlus"
7
+ version = "0.1.0"
8
+ description = "vidgets for customtkinter"
9
+ dependencies = [
10
+ "customtkinter",
11
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+