Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- from tkinter import *
- root = Tk()
- but = Button(root,
- text = "Это кнопка",
- width = 30, height = 5,
- bg = "white", fg = "blue")
- but.pack()
- lab = Label(root, text = "ЭТО метка! \n из двух строк", font = "Arial 14")
- lab.pack()
- ent = Entry(root, width = 30, bd = 3)
- ent.pack()
- tex = Text(root, width = 40, height = 10, font = "Verdana 12", wrap = WORD)
- tex.pack()
- var = IntVar() #var = 1
- var.set(3)
- rad0 = Radiobutton(root, text = "Первая", variable = var, value = 0)
- rad1 = Radiobutton(root, text = "Вторая", variable = var, value = 1)
- rad2 = Radiobutton(root, text = "Третья", variable = var, value = 2)
- rad0.pack()
- rad1.pack()
- rad2.pack()
- c2 = IntVar()
- c2.set(0)
- c1 = IntVar()
- c1.set(0)
- che1 = Checkbutton(root, text = "Первый флажок",
- variable = c1, onvalue = 1,
- offvalue = 0)
- che2 = Checkbutton(root, text = "Второй флажок",
- variable = c2, onvalue = 2,
- offvalue = 0)
- che1.pack()
- che2.pack()
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement