FunctionGUI 0.2.0__tar.gz → 0.3.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.
- functiongui-0.3.0/FunctionGUI/FunctionGUI.py +98 -0
- {functiongui-0.2.0 → functiongui-0.3.0}/FunctionGUI/__init__.py +6 -1
- {functiongui-0.2.0 → functiongui-0.3.0}/FunctionGUI.egg-info/PKG-INFO +2 -1
- functiongui-0.3.0/FunctionGUI.egg-info/requires.txt +2 -0
- {functiongui-0.2.0 → functiongui-0.3.0}/PKG-INFO +2 -1
- {functiongui-0.2.0 → functiongui-0.3.0}/setup.py +2 -1
- functiongui-0.2.0/FunctionGUI/FunctionGUI.py +0 -52
- functiongui-0.2.0/FunctionGUI.egg-info/requires.txt +0 -1
- {functiongui-0.2.0 → functiongui-0.3.0}/FunctionGUI.egg-info/SOURCES.txt +0 -0
- {functiongui-0.2.0 → functiongui-0.3.0}/FunctionGUI.egg-info/dependency_links.txt +0 -0
- {functiongui-0.2.0 → functiongui-0.3.0}/FunctionGUI.egg-info/top_level.txt +0 -0
- {functiongui-0.2.0 → functiongui-0.3.0}/README.md +0 -0
- {functiongui-0.2.0 → functiongui-0.3.0}/setup.cfg +0 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
|
2
|
+
import tkinter as tk
|
3
|
+
from tkinter import ttk
|
4
|
+
from ttkbootstrap import Style
|
5
|
+
from tkinter import font as tkfont
|
6
|
+
from PIL import Image, ImageTk
|
7
|
+
from tkinter import filedialog
|
8
|
+
|
9
|
+
|
10
|
+
def Window():
|
11
|
+
root = tk.Tk()
|
12
|
+
return root
|
13
|
+
|
14
|
+
def Title(root, title = "New Window"):
|
15
|
+
a = root.title(title)
|
16
|
+
return a
|
17
|
+
|
18
|
+
def Label(parent, text="Default Text", font="Helvetica", size=12, color="black"):
|
19
|
+
label = ttk.Label(parent, text=text, font = (font, size), foreground = color); label.pack();
|
20
|
+
return label
|
21
|
+
|
22
|
+
def Place(widget, x, y):
|
23
|
+
widget.place(x=x, y=y)
|
24
|
+
|
25
|
+
def Font(name = 'arial', size = 20, weight = "bold"):
|
26
|
+
font = tkfont.Font(name = name, size = size, weight = weight)
|
27
|
+
return font
|
28
|
+
|
29
|
+
def OpenFile(title):
|
30
|
+
file_path = filedialog.askopenfilename(title="Select a file")
|
31
|
+
return file_path
|
32
|
+
def ChexBox(parent, text = 'check me', variable=None, command = None):
|
33
|
+
checkbutton = ttk.Checkbutton(parent, text=text, variable=variable, command=command)
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
def add(widget, padx = 10, pady = 10):
|
38
|
+
widget.pack(padx = padx, pady = pady)
|
39
|
+
|
40
|
+
def BGImage(parent, bg_image_path = '', width=400 , height=300):
|
41
|
+
# Load and set the background image
|
42
|
+
bg_image = Image.open(bg_image_path)
|
43
|
+
bg_image = bg_image.resize((width, height), Image.ANTIALIAS)
|
44
|
+
bg_photo = ImageTk.PhotoImage(bg_image)
|
45
|
+
|
46
|
+
background_label = tk.Label(parent, image=bg_photo)
|
47
|
+
background_label.image = bg_photo # Keep a reference to avoid garbage collection
|
48
|
+
background_label.place(x=0, y=0, relwidth=1, relheight=1)
|
49
|
+
|
50
|
+
def Button(parent, text="Button", command=None, font="Helvetica", size=12, bg="black", fg="black", width=20, height=20):
|
51
|
+
button = tk.Button(parent, text=text, command=command, font=(font, size), bg=bg, fg=fg, width=width, height=height)
|
52
|
+
return button
|
53
|
+
|
54
|
+
def Entry(parent, width=20, font="Helvetica", size=12, bg="white", fg="black"):
|
55
|
+
entry = ttk.Entry(parent, width=width, font=(font, size), background=bg, foreground=fg)
|
56
|
+
return entry
|
57
|
+
|
58
|
+
def GetEntry(entry):
|
59
|
+
d = entry.get()
|
60
|
+
return entry
|
61
|
+
|
62
|
+
def Design(theme):
|
63
|
+
style = Style(theme=theme)
|
64
|
+
return style
|
65
|
+
|
66
|
+
def BulleanVar():
|
67
|
+
Variable = tk.BooleanVar()
|
68
|
+
return Variable
|
69
|
+
|
70
|
+
def Run(window):
|
71
|
+
window.mainloop()
|
72
|
+
|
73
|
+
def BGImage(parent, bg_image_path = '', width=400 , height=300):
|
74
|
+
# Load and set the background image
|
75
|
+
bg_image = Image.open(bg_image_path)
|
76
|
+
bg_image = bg_image.resize((width, height), Image.ANTIALIAS)
|
77
|
+
bg_photo = ImageTk.PhotoImage(bg_image)
|
78
|
+
|
79
|
+
background_label = tk.Label(parent, image=bg_photo)
|
80
|
+
background_label.image = bg_photo # Keep a reference to avoid garbage collection
|
81
|
+
background_label.place(x=0, y=0, relwidth=1, relheight=1)
|
82
|
+
|
83
|
+
def Button(parent, text="Button", command=None, font="Helvetica", size=12, bg="black", fg="black", width=20, height=20, padx = 10, pady = 10):
|
84
|
+
button = tk.Button(parent, text=text, command=command, font=(font, size), bg=bg, fg=fg, width=width, height=height)
|
85
|
+
button.pack(padx=padx, pady=pady)
|
86
|
+
return button
|
87
|
+
|
88
|
+
def Entry(parent, width=20, font="Helvetica", size=12, bg="white", fg="black", padx = 10, pady = 10):
|
89
|
+
entry = ttk.Entry(parent, width=width, font=(font, size), background=bg, foreground=fg)
|
90
|
+
entry.pack(padx=padx, pady=pady)
|
91
|
+
return entry
|
92
|
+
|
93
|
+
def GetEntry(entry):
|
94
|
+
d = entry.get()
|
95
|
+
return entry
|
96
|
+
|
97
|
+
def Run(window):
|
98
|
+
window.mainloop()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: FunctionGUI
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.3.0
|
4
4
|
Summary: A simple Tkinter GUI library with basic widgets and functionality.
|
5
5
|
Home-page: https://github.com/aa425/FunctionGUI
|
6
6
|
Author: Aaroh Charne
|
@@ -15,6 +15,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
15
15
|
Requires-Python: >=3.6
|
16
16
|
Description-Content-Type: text/markdown
|
17
17
|
Requires-Dist: Pillow
|
18
|
+
Requires-Dist: ttkbootstrap
|
18
19
|
|
19
20
|
# FunctionGUI
|
20
21
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: FunctionGUI
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.3.0
|
4
4
|
Summary: A simple Tkinter GUI library with basic widgets and functionality.
|
5
5
|
Home-page: https://github.com/aa425/FunctionGUI
|
6
6
|
Author: Aaroh Charne
|
@@ -15,6 +15,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
15
15
|
Requires-Python: >=3.6
|
16
16
|
Description-Content-Type: text/markdown
|
17
17
|
Requires-Dist: Pillow
|
18
|
+
Requires-Dist: ttkbootstrap
|
18
19
|
|
19
20
|
# FunctionGUI
|
20
21
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='FunctionGUI', # Replace with your library name
|
5
|
-
version='0.
|
5
|
+
version='0.3.0', # Start with an initial version
|
6
6
|
description='A simple Tkinter GUI library with basic widgets and functionality.',
|
7
7
|
long_description=open('README.md').read(), # Make sure you have a README.md file
|
8
8
|
long_description_content_type='text/markdown',
|
@@ -12,6 +12,7 @@ setup(
|
|
12
12
|
packages=find_packages(), # Automatically find packages in the directory
|
13
13
|
install_requires=[
|
14
14
|
'Pillow',
|
15
|
+
'ttkbootstrap'
|
15
16
|
],
|
16
17
|
classifiers=[
|
17
18
|
'Programming Language :: Python :: 3',
|
@@ -1,52 +0,0 @@
|
|
1
|
-
import tkinter as tk
|
2
|
-
from tkinter import ttk
|
3
|
-
|
4
|
-
from tkinter import font as tkfont
|
5
|
-
from PIL import Image, ImageTk
|
6
|
-
|
7
|
-
def Window():
|
8
|
-
root = tk.Tk()
|
9
|
-
return root
|
10
|
-
|
11
|
-
def Title(root, title = "New Window"):
|
12
|
-
a = root.title(title)
|
13
|
-
return a
|
14
|
-
|
15
|
-
def Label(parent, text="Default Text", font="Helvetica", size=12, color="black"):
|
16
|
-
label = ttk.Label(parent, text=text, font = (font, size), foreground = color); label.pack();
|
17
|
-
return label
|
18
|
-
|
19
|
-
def Place(widget, x, y):
|
20
|
-
widget.place(x=x, y=y)
|
21
|
-
|
22
|
-
def Font(name = 'arial', size = 20, weight = 10):
|
23
|
-
font = tkfont.Font(family=name, size=size, weight=weight)
|
24
|
-
return font
|
25
|
-
|
26
|
-
|
27
|
-
def BGImage(parent, bg_image_path = '', width=400 , height=300):
|
28
|
-
# Load and set the background image
|
29
|
-
bg_image = Image.open(bg_image_path)
|
30
|
-
bg_image = bg_image.resize((width, height), Image.ANTIALIAS)
|
31
|
-
bg_photo = ImageTk.PhotoImage(bg_image)
|
32
|
-
|
33
|
-
background_label = tk.Label(parent, image=bg_photo)
|
34
|
-
background_label.image = bg_photo # Keep a reference to avoid garbage collection
|
35
|
-
background_label.place(x=0, y=0, relwidth=1, relheight=1)
|
36
|
-
|
37
|
-
def Button(parent, text="Button", command=None, font="Helvetica", size=12, bg="black", fg="black", width=20, height=20, padx = 10, pady = 10):
|
38
|
-
button = tk.Button(parent, text=text, command=command, font=(font, size), bg=bg, fg=fg, width=width, height=height)
|
39
|
-
button.pack(padx=padx, pady=pady)
|
40
|
-
return button
|
41
|
-
|
42
|
-
def Entry(parent, width=20, font="Helvetica", size=12, bg="white", fg="black", padx = 10, pady = 10):
|
43
|
-
entry = ttk.Entry(parent, width=width, font=(font, size), background=bg, foreground=fg)
|
44
|
-
entry.pack(padx=padx, pady=pady)
|
45
|
-
return entry
|
46
|
-
|
47
|
-
def GetEntry(entry):
|
48
|
-
d = entry.get()
|
49
|
-
return entry
|
50
|
-
|
51
|
-
def Run(window):
|
52
|
-
window.mainloop()
|
@@ -1 +0,0 @@
|
|
1
|
-
Pillow
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|