Krasav4ik_02
New member
Код:
from tkinter import *
from tkinter import messagebox
import webbrowser
window = Tk()
window.title("IT-20-05") #title
window.geometry('500x400') #размер окна
window.resizable(width=False, height=False) #Отвечает за размер окна чтобы не менялось
window["bg"] = "#87CEFA"
def open(url):
webbrowser.open_new(url)
def matem():
lbl.configure(text="Математика:\nФ.И.О:Аскарова Альфия Жанбековна\nE-MAIL:**********@mail.ru")
def inform():
lbl.configure(text=" 703-014-1943 \n 1111")
def kazakh():
lbl.configure(text=" 981-941-1896 \n 2020 ")
def angl():
lbl.configure(text=" 8580871465 \n 653653 ")
def polit():
lbl.configure(text=" 464-918-7666 \n 438859 ")
def kurat():
lbl.configure(text=" 646-767-4915 \n 13062002 ")
def fizra():
lbl.configure(text=" Я пока что хз \n")
def clear():
lbl.configure(text="")
lbl = Label(window, text='Пустое поле',
justify=LEFT,
bg='#87CEFA',
font=('Times New Roman', 12))
lbl.place(x=130, y=0)
label2 = Label(window, text="----------------------------------------\n♥IT-20-05 KAZ-ATU♥\n----------------------------------------",
bg='#87CEFA',
font=("Algerian", 22))
label2.place(x=130,y= 310)
btn = Button(window, text = 'Clear',
bg='Red', fg='White',
height=1, width=8 ,
font=("Times New Roman", 9),
command = clear)
btn.place(x=390,y = 300)
btn = Button(window, text = 'Matematika ½',
bg='#00BFFF', fg='black',
height=2, width=12 ,
font=("Matura MT Script Capitals", 9),
command = matem)
btn.grid(column=0, row=1)
btn = Button(window, text = 'Informatika ✉',
bg='#00BFFF', fg='black',
height=2, width=12 ,
font=("Matura MT Script Capitals", 9),
command = inform)
btn.grid(column=0, row=2)
btn = Button(window, text = 'Kazakh A',
bg='#00BFFF', fg='black',
height=2, width=12 ,
font=("Matura MT Script Capitals", 9),
command = inform)
btn.grid(column=0, row=3)
btn = Button(window, text = 'English',
bg='#00BFFF', fg='black',
height=2, width=12 ,
font=("Matura MT Script Capitals", 9),
command = inform)
btn.grid(column=0, row=4)
btn = Button(window, text = 'Politologia',
bg='#00BFFF', fg='black',
height=2, width=12 ,
font=("Matura MT Script Capitals", 9),
command = inform)
btn.grid(column=0, row=5)
btn = Button(window, text = 'Kurator',
bg='#00BFFF', fg='black',
height=2, width=12 ,
font=("Matura MT Script Capitals", 9),
command = inform)
btn.grid(column=0, row=6)
btn = Button(window, text = 'Fizra',
bg='#00BFFF', fg='black',
height=2, width=12 ,
font=("Matura MT Script Capitals", 9),
command = inform)
btn.grid(column=0, row=7)
btn = Button(window, text = 'German 卐',
bg='#00BFFF', fg='black',
height=2, width=12 ,
font=("Matura MT Script Capitals", 9),
command = inform)
btn.grid(column=0, row=8)
btn = Button(window, text = 'Kazakh B',
bg='#00BFFF', fg='black',
height=2, width=12 ,
font=("Matura MT Script Capitals", 9),
command = inform)
btn.grid(column=0, row=9)
btn = Button(window, text = 'Open',
bg='#00BFFF', fg='black',
height=2, width=12 ,
font=("Matura MT Script Capitals", 9),
command = lambda : open(""))
btn.grid(column=1, row=9)
window.mainloop()
Кнопка Open открывала разные ссылки помогите пожалуиста
Старался чтобы код был понятен но хз как получилось
Заранее спасибо