We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c6ecd7 commit 517d4bbCopy full SHA for 517d4bb
src/main.py
@@ -42,6 +42,11 @@ def openfile():
42
except AttributeError:
43
pass
44
45
+def new():
46
+ filename.set(value="unsaved")
47
+ root.title("txt2 - Untitled *")
48
+ textwidget.delete("1.0", "end")
49
+
50
filename = tkinter.StringVar(value="unsaved")
51
52
header = tkinter.Frame(root, height="50")
@@ -77,6 +82,7 @@ def fileboxaction(*args):
77
82
if action == "Save": save()
78
83
elif action == "Open": openfile()
79
84
elif action == "Save As": saveas()
85
+ elif action == "New": new()
80
86
81
87
fileboxstate.trace("w", fileboxaction)
88
0 commit comments