@ -1,6 +1,7 @@
import tkinter
import tkinter
import tkinter . messagebox
import tkinter . messagebox
import customtkinter
import customtkinter
from api import get_person_all
@ -63,6 +64,9 @@ class ÜbersichtFrame(customtkinter.CTkFrame):
self . textbox = customtkinter . CTkTextbox ( self , width = 600 , height = 100 )
self . textbox = customtkinter . CTkTextbox ( self , width = 600 , height = 100 )
self . textbox . grid ( row = 0 , column = 0 , padx = ( 20 , 0 ) , pady = ( 20 , 0 ) , sticky = " nsew " )
self . textbox . grid ( row = 0 , column = 0 , padx = ( 20 , 0 ) , pady = ( 20 , 0 ) , sticky = " nsew " )
# set default values
# set default values
self . textbox . insert ( " 0.0 " , " Übersicht \n \n " + ' Hier kanst du dir eine Übersicht über deine Ausgaben und Einnahmen verschaffen. Alle eingetragenen Daten werden hier für dich einfach nachvollziehbar angezeigt. ' )
self . textbox . insert ( " 0.0 " , " Übersicht \n \n " + ' Hier kanst du dir eine Übersicht über deine Ausgaben und Einnahmen verschaffen. Alle eingetragenen Daten werden hier für dich einfach nachvollziehbar angezeigt. ' )
self . textbox . configure ( state = ' disabled ' )
self . textbox . configure ( state = ' disabled ' )
@ -84,13 +88,25 @@ class PersonFrame(customtkinter.CTkFrame):
customtkinter . CTkFrame . __init__ ( self , parent )
customtkinter . CTkFrame . __init__ ( self , parent )
#super().__init__(*args, **kwargs)
#super().__init__(*args, **kwargs)
# create textbox
# create textbox
persons = get_person_all ( )
personNames = [ ]
for person in persons :
personNames . append ( person [ ' Name ' ] )
self . textbox = customtkinter . CTkTextbox ( self , width = 600 , height = 100 )
self . textbox = customtkinter . CTkTextbox ( self , width = 600 , height = 100 )
self . textbox . grid ( row = 0 , column = 0 , padx = ( 20 , 0 ) , pady = ( 20 , 0 ) , sticky = " nsew " )
self . textbox . grid ( row = 0 , column = 0 , padx = ( 20 , 0 ) , pady = ( 20 , 0 ) , sticky = " nsew " )
self . activePersonLabel = customtkinter . CTkLabel ( self , text = ' Aktive Person ' )
self . activePersonLabel . grid ( row = 1 , column = 0 , padx = ( 20 , 0 ) , pady = ( 20 , 0 ) , sticky = " nw " )
self . optionMenu = customtkinter . CTkOptionMenu ( self , values = personNames , command = self . optionmenu_callback )
self . optionMenu . grid ( row = 2 , column = 0 , padx = ( 20 , 0 ) , sticky = " nw " )
# set default values
# set default values
self . textbox . insert ( " 0.0 " , " Person \n \n " + ' Hier kannst du neue Personen erstellen, und die aktuell aktive Person ' )
self . textbox . insert ( " 0.0 " , " Person \n \n " + ' Hier kannst du neue Personen erstellen, und die aktuell aktive Person auswählen ' )
self . textbox . configure ( state = ' disabled ' )
self . textbox . configure ( state = ' disabled ' )
def optionmenu_callback ( self , choice ) :
print ( " optionmenu dropdown clicked: " , choice )
class ExampleFrame ( customtkinter . CTkFrame ) :
class ExampleFrame ( customtkinter . CTkFrame ) :
def __init__ ( self , parent , controller ) :
def __init__ ( self , parent , controller ) :
customtkinter . CTkFrame . __init__ ( self , parent )
customtkinter . CTkFrame . __init__ ( self , parent )
@ -222,6 +238,10 @@ class SidebarFrame(customtkinter.CTkFrame):
# Button Export
# Button Export
self . sidebar_button_6 = customtkinter . CTkButton ( self . sidebar_frame , text = " Export " , command = lambda : controller . show_frame ( ' exportFrame ' ) )
self . sidebar_button_6 = customtkinter . CTkButton ( self . sidebar_frame , text = " Export " , command = lambda : controller . show_frame ( ' exportFrame ' ) )
self . sidebar_button_6 . grid ( row = 8 , column = 0 , padx = 20 , pady = 10 )
self . sidebar_button_6 . grid ( row = 8 , column = 0 , padx = 20 , pady = 10 )
# Example Frame
self . sidebar_button_7 = customtkinter . CTkButton ( self . sidebar_frame , text = " Example " , command = lambda : controller . show_frame ( ' exampleFrame ' ) )
self . sidebar_button_7 . grid ( row = 9 , column = 0 , padx = 20 , pady = 10 )
# Apperance Mode Label
# Apperance Mode Label
self . appearance_mode_label = customtkinter . CTkLabel ( self . sidebar_frame , text = " Theme: " , anchor = " w " )
self . appearance_mode_label = customtkinter . CTkLabel ( self . sidebar_frame , text = " Theme: " , anchor = " w " )