-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sharon Christine Yates
committed
Aug 23, 2024
1 parent
a94cf7d
commit acab94c
Showing
3 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import tkinter | ||
|
||
from tkinter import * | ||
from tkinter import ttk | ||
|
||
from tkinter import * | ||
from tkinter import ttk | ||
|
||
#Basic GUI example | ||
""" | ||
root = Tk() | ||
ttk.Button(root, text="Hello World").grid() | ||
root.mainloop() | ||
""" | ||
|
||
root = Tk() | ||
root.title("PyNutil") | ||
#photo = tkinker.PhotoImage(file = 'Logo_PyN.png') | ||
#root.wm_iconphoto(False, photo) | ||
|
||
atlas = ["Reference Atlas", "Allen CCFv3", "WHS v3", "WHS v4"] | ||
selected_atlas = StringVar(value=atlas[0]) | ||
|
||
directory = ["select","select1", "select2"] | ||
selected_directory = StringVar(value=atlas[0]) | ||
|
||
colour = ["colour","black","red","blue","green"] | ||
selected_colour = StringVar(value=colour[0]) | ||
|
||
#Creating a content frame" | ||
mainframe = ttk.Frame(root, padding="12 12 12 12") # left top right bottom | ||
mainframe.grid(column=0, row=0, sticky=(N, W, E, S)) | ||
root.columnconfigure(0, weight=1) # column to expand if there is extra space | ||
root.rowconfigure(0, weight=1) # row to expand if there is extra space | ||
|
||
ttk.Label(mainframe, text="Reference atlas").grid(column=1, row=1, sticky=W) | ||
ttk.Label(mainframe, text="Registration JSON").grid(column=1, row=2, sticky=W) | ||
ttk.Label(mainframe, text="Segmentation folder").grid(column=1, row=3, sticky=W) | ||
ttk.Label(mainframe, text="Object colour").grid(column=1, row=4, sticky=W) | ||
ttk.Label(mainframe, text="Output directory").grid(column=1, row=5, sticky=W) | ||
|
||
ttk.Button(mainframe, text="Help", command="buttonpressed").grid(column=2, row=1, sticky=W) | ||
ttk.Button(mainframe, text="Help", command="buttonpressed").grid(column=2, row=2, sticky=W) | ||
ttk.Button(mainframe, text="Help", command="buttonpressed").grid(column=2, row=3, sticky=W) | ||
ttk.Button(mainframe, text="Help", command="buttonpressed").grid(column=2, row=4, sticky=W) | ||
ttk.Button(mainframe, text="Help", command="buttonpressed").grid(column=2, row=5, sticky=W) | ||
|
||
ttk.OptionMenu(mainframe, selected_atlas, *atlas).grid(column=3, row=1, sticky=W) | ||
ttk.OptionMenu(mainframe, selected_directory, *directory).grid(column=3, row=2, sticky=W) | ||
ttk.OptionMenu(mainframe, selected_directory, *directory).grid(column=3, row=3, sticky=W) | ||
ttk.OptionMenu(mainframe, selected_colour, *colour).grid(column=3, row=4, sticky=W) | ||
ttk.OptionMenu(mainframe, selected_directory, *directory).grid(column=3, row=5, sticky=W) | ||
|
||
ttk.Button(mainframe, text="Browse...", command="buttonpressed").grid(column=4, row=1, sticky=W) | ||
ttk.Button(mainframe, text="Browse...", command="buttonpressed").grid(column=4, row=2, sticky=W) | ||
ttk.Button(mainframe, text="Browse...", command="buttonpressed").grid(column=4, row=3, sticky=W) | ||
ttk.Button(mainframe, text="Select colour", command="buttonpressed").grid(column=4, row=4, sticky=W) | ||
ttk.Button(mainframe, text="Browse...", command="buttonpressed").grid(column=4, row=5, sticky=W) | ||
|
||
|
||
|
||
# sunken frame around mainframe | ||
""" | ||
mainframe['borderwidth'] = 2 | ||
mainframe['relief'] = 'sunken' | ||
""" | ||
|
||
#button.configure() | ||
|
||
root.mainloop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters