Skip to content

Commit

Permalink
Update 0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
watakak authored Feb 22, 2024
1 parent 89b90c7 commit 9586e35
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions freshgui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import tkinter as tk

#FRESHGUI MODULE VERSION 0.2.1

dict = {}

def create(name='FreshGUI Window', size='400x300', icon='', resizable='True'):
global root

root = tk.Tk()
root.title(name)
root.geometry(size)
root.resizable(width=resizable, height=resizable)
root.iconbitmap(icon)
root.configure(background=themeBG)

def theme(theme='Light'):
global themeBG

if theme == 'Dark':
themeBG = '#1F1F1F'
elif theme == 'Light':
themeBG = '#EEEEEE'

def text(name='textVariable', text='Text'):
dict[name] = tk.Label(root, text=text)
dict[name].pack()

def textUpdate(name='textVariable', text='Text'):
dict[name].config(text=text)

def button(name='buttonVariable', text='Button', command='', cursor='hand2'):
dict[name] = tk.Button(root, text=text, command=command)
dict[name].pack()
dict[name].configure(cursor=cursor)

def run():
root.mainloop()

0 comments on commit 9586e35

Please sign in to comment.