FunctionGUI 0.2.0__py3-none-any.whl → 0.4.0__py3-none-any.whl

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.
@@ -1,8 +1,11 @@
1
+
1
2
  import tkinter as tk
2
3
  from tkinter import ttk
3
-
4
+ from ttkbootstrap import Style
4
5
  from tkinter import font as tkfont
5
6
  from PIL import Image, ImageTk
7
+ from tkinter import filedialog
8
+
6
9
 
7
10
  def Window():
8
11
  root = tk.Tk()
@@ -19,10 +22,53 @@ def Label(parent, text="Default Text", font="Helvetica", size=12, color="black")
19
22
  def Place(widget, x, y):
20
23
  widget.place(x=x, y=y)
21
24
 
22
- def Font(name = 'arial', size = 20, weight = 10):
23
- font = tkfont.Font(family=name, size=size, weight=weight)
25
+ def Font(name = 'arial', size = 20, weight = "bold"):
26
+ font = tkfont.Font(name = name, size = size, weight = weight)
24
27
  return font
25
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()
26
72
 
27
73
  def BGImage(parent, bg_image_path = '', width=400 , height=300):
28
74
  # Load and set the background image
FunctionGUI/__init__.py CHANGED
@@ -10,5 +10,10 @@ from .FunctionGUI import (
10
10
  Button,
11
11
  Entry,
12
12
  GetEntry,
13
- Run
13
+ Run,
14
+ BulleanVar,
15
+ ChexBox,
16
+ add,
17
+ Design
18
+
14
19
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: FunctionGUI
3
- Version: 0.2.0
3
+ Version: 0.4.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
 
@@ -0,0 +1,6 @@
1
+ FunctionGUI/FunctionGUI.py,sha256=nSK7EN07HGH_0mCvt-jtwXk8VPE8W6LS-B5VHkt8Cbc,3422
2
+ FunctionGUI/__init__.py,sha256=2ISosIKxMmzDZfv21bQ9l3GC22sp0Be2Ws3Sv-5LEK4,227
3
+ FunctionGUI-0.4.0.dist-info/METADATA,sha256=Xqa3xcHyRrO43yW-BeHlP8ec3cvEGiQpmqdAG99XLBE,2942
4
+ FunctionGUI-0.4.0.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
5
+ FunctionGUI-0.4.0.dist-info/top_level.txt,sha256=_gisKDTO1FqIkJYqH6X1ZrcA0ZvQdKnA_JhABqCSUFo,12
6
+ FunctionGUI-0.4.0.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- FunctionGUI/FunctionGUI.py,sha256=iqHp_vPGsVlO1fgTCvAdrcSNHcQNaXZKG8sQTph4NA4,1804
2
- FunctionGUI/__init__.py,sha256=AaP8wV9VTCZQnkjCjNKd8vQdLquGJUxW1SM554vOh1M,171
3
- FunctionGUI-0.2.0.dist-info/METADATA,sha256=eXaJ6e8gu66NGiYjQFov50gVrW2gsT2s-Erwh-1bKSE,2913
4
- FunctionGUI-0.2.0.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
5
- FunctionGUI-0.2.0.dist-info/top_level.txt,sha256=_gisKDTO1FqIkJYqH6X1ZrcA0ZvQdKnA_JhABqCSUFo,12
6
- FunctionGUI-0.2.0.dist-info/RECORD,,