Skip to content

Commit d7de678

Browse files
authored
Add files via upload
1 parent d9e1f2e commit d7de678

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Main.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from tkinter import *
2-
import fileIO
2+
import datetime as dt
33
# used to close the windows
44
def Close_start():
55
start.destroy()
@@ -18,10 +18,10 @@ def Write(html):
1818
# Main Editing Window
1919
def Main_win():
2020
# sets variables to global so they can be accessed in another function
21-
global main, title, heading, body
21+
global main, title, heading, body, SAVE
2222
Close_start()
2323
main = Tk()
24-
main.title("HTML Editor")
24+
main.title("HTML Creator")
2525
main.geometry("1000x700")
2626
display_text = "HTML Editor"
2727
T = Text(main, height = 2, width = 15)
@@ -52,7 +52,9 @@ def Main_win():
5252
body = Text(main, width=30, height=6, font=("Arial", 12))
5353
body.place(x=150, y=166)
5454
Exit = Button(main, text = "EXIT", command=Close_main, height=6, width=12, bg="red", activebackground='gray').place(x=880, y=575)
55-
Create = Button(main, text= "CREATE", command=CREATE, height=6, width=30, bg="green", activebackground='gray').place(x=650, y=130)
55+
Create = Button(main, text= "CREATE", font=("Arial", 12), command=CREATE, height=6, width=20, bg="green", activebackground='gray').place(x=650, y=130)
56+
SAVE = Text(main, height = 2, width = 15)
57+
SAVE.place(x=400, y=320)
5658
main.mainloop()
5759
def Main():
5860
# sets start to global so that it can be used by the close functions to destroy it
@@ -79,4 +81,6 @@ def CREATE():
7981
HTML= "<html>\n<head>\n<title>" + HTML_title + "</title></head>\n<body>\n<h2>" + HTML_head +"</h2>\n<p>"+ HTML_body
8082
HTML = HTML + "</p></body>\n</html>"
8183
Write(HTML)
84+
SAVE.insert(END, "Saved" + str(dt.time))
85+
SAVE["state"] = DISABLED
8286
Main()

0 commit comments

Comments
 (0)