You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
592 B
24 lines
592 B
import tkinter as tk
|
|
from tkinter import filedialog
|
|
|
|
def select_folder():
|
|
folder_path = filedialog.askdirectory()
|
|
folder_label.config(text="Selected Folder: " + folder_path)
|
|
|
|
# Create the main window
|
|
root = tk.Tk()
|
|
root.title("KicED library linker")
|
|
|
|
# Create a label to display the selected folder
|
|
folder_label = tk.Label(root, text="Selected KiCad project folder: ")
|
|
folder_label.pack(pady=10)
|
|
|
|
# Create a button to open the file dialog
|
|
select_button = tk.Button(root, text="Select Folder", command=select_folder)
|
|
select_button.pack()
|
|
|
|
|
|
# Start the GUI application
|
|
root.mainloop()
|
|
|