-
Notifications
You must be signed in to change notification settings - Fork 0
/
lesson8.py
38 lines (30 loc) · 1.05 KB
/
lesson8.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from tkinter import *
from tkinter import ttk
import tkinter
root = Tk()
root.title("Tkinter")
root.geometry("500x500")
ttk.Label(root, text = "Combobox Example",
background = 'yellow', foreground ="black",
font = ("Times New Roman", 15)).grid(row = 0, column = 1)
ttk.Label(root, text = "Select the Month :",
font = ("Times New Roman", 10)).grid(column = 0,
row = 5, padx = 10, pady = 25)
n = tkinter.StringVar()
monthchoosen = ttk.Combobox(root, width = 27, textvariable = n)
monthchoosen['values'] = (' January',
' February',
' March',
' April',
' May',
' June',
' July',
' August',
' September',
' October',
' November',
' December')
monthchoosen.grid(column = 1, row = 5)
#monthchoosen.current()
monthchoosen.current(1)
root.mainloop()