import tkinter as tk
from tkinter import filedialog



class CTMeth_gui:
    def __init__(self, master):
        
        self.master = master
        self.master.geometry("800x600")
        self.master.title("CTmeth GUI")
        self.menubar = tk.Menu(self.master, foreground='black', activebackground='white', activeforeground='black') 
        self.menubar .add_command(label="New project", command=self.new_project)
        self.file = tk.Menu(self.menubar, tearoff=1, background='#ffcc99', foreground='black')
        self.master.config(menu=self.menubar)
        
        self.frame = tk.Frame(self.master)
        self.frame.pack()
        
        self.project_path = ""
        
        
    def new_project(self):
        self.project_path = tk.filedialog.askdirectory()
        print(f"button pressed {self.project_path}")



def main(): 
    root = tk.Tk()
    app = CTMeth_gui(root)
    root.mainloop()

if __name__ == '__main__':
    main()