Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ac90358

Browse files
Merge pull request avinashkranjan#641 from aishwaryachand/aishwarya-3
Calendar - GUI
2 parents 8207984 + 7ffe95d commit ac90358

File tree

4 files changed

+91
-0
lines changed

4 files changed

+91
-0
lines changed
141 KB
Loading[フレーム]

‎Calendar GUI/Calendar_gui.py‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# -*- coding: utf-8 -*-
2+
from tkinter import *
3+
import calendar
4+
5+
6+
def showCal() :
7+
8+
9+
box= Tk()
10+
11+
12+
13+
box.title("Calendar For The Year")
14+
15+
box.geometry("550x600")
16+
17+
find_year = int(year_field.get())
18+
19+
first_label = Label(box,text = 'CALENDAR',bg = 'dark grey' , font = ("times",28,'bold'))
20+
first_label.grid(row=1,column =1)
21+
22+
box.config(background = "white")
23+
24+
cal_data = calendar.calendar(find_year)
25+
cal_year = Label(box, text = cal_data, font = "consolas 10 bold",justify=LEFT)
26+
27+
cal_year.grid(row = 2, column = 1, padx = 20,)
28+
29+
30+
box.mainloop()
31+
32+
33+
34+
35+
if __name__ == "__main__" :
36+
37+
38+
gui = Tk()
39+
40+
41+
gui.config(background = "misty rose")
42+
43+
gui.title("CALENDAR")
44+
45+
gui.geometry("250x250")
46+
47+
48+
cal = Label(gui, text = "CALENDAR",bg="lavender",font = ("Helvetica", 28, 'bold','underline'))
49+
50+
51+
year = Label(gui, text = "Enter Year", bg = "peach puff" , padx=10, pady=10 )
52+
53+
year_field = Entry(gui)
54+
55+
56+
Show = Button(gui, text = "Show Calendar", fg = "Black",
57+
bg = "lavender", command = showCal)
58+
59+
Exit = Button(gui, text = "CLOSE", bg = "peach puff", command = exit)
60+
61+
62+
cal.grid(row = 1, column = 1)
63+
64+
year.grid(row = 3, column = 1)
65+
66+
year_field.grid(row = 4, column = 1)
67+
68+
Show.grid(row = 5, column = 1)
69+
70+
Exit.grid(row = 7, column = 1)
71+
72+
gui.mainloop()

‎Calendar GUI/Input Calendar.png‎

21.3 KB
Loading[フレーム]

‎Calendar GUI/README.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Calendar GUI
2+
3+
Using this code you will be able to create a Calendar GUI where calendar of a specific year apears .The year is specified by the user.
4+
5+
## Dependencies
6+
You will use `Tkinter` and `calendar` python module .
7+
8+
## Sample Output
9+
On running `Calendar_gui.py`.
10+
11+
[![Input-Calendar.png](https://i.postimg.cc/XvWkzGgK/Input-Calendar.png)](https://postimg.cc/rDh4dp3z)
12+
13+
14+
[![Calendar-for-the-year.png](https://i.postimg.cc/5yDwq60C/Calendar-for-the-year.png)](https://postimg.cc/LgBYm4j9)
15+
16+
17+
## Author
18+
[Aishwarya Chand](https://github.com/aishwaryachand)
19+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /