| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 229f8d6 commit aed5d61
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,18 @@ | |||
| 1 | + # importing tkinter | ||
| 2 | + from tkinter import * | ||
| 3 | + # importing calendar module | ||
| 4 | + import calendar | ||
| 5 | + # initializing tkinter | ||
| 6 | + root = Tk() | ||
| 7 | + # setting title of our Gui | ||
| 8 | + root.title("My Own Gui Calendar") | ||
| 9 | + # year for which we want the calendar to be shown on our Gui | ||
| 10 | + year = 2020 | ||
| 11 | + # storing 2020 year calendar data inside myCal | ||
| 12 | + myCal = calendar.calendar(year) | ||
| 13 | + # showing calendar data using label widget | ||
| 14 | + cal_year = Label(root, text=myCal, font="Consolas 10 bold") | ||
| 15 | + # packing the Label widget | ||
| 16 | + cal_year.pack() | ||
| 17 | + # running the program in ready state | ||
| 18 | + root.mainloop() | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments