Mundo em Python

Atalhos das Redes Socias

import webbrowser
from tkinter import *
root =Tk()
class redessociais():
def __init__(self):
self.root = root
self.janela()
self.app()
root.mainloop()
def janela(self):
self.root.title("Atalhos da Redes Socias")
self.root.geometry("500x425")
self.root.resizable(False, False)
def app(self):
self.texto = Label (text='Redes sociais',font=("Arial",'15','bold'))
self.texto.place(relx=0.25, rely=0.05,relwidth=0.45, relheight=0.1)
# Butão de calcular
self.bt_facebook = Button(text="Facebook", bd=2,
command=self.facebook,
font=('verdana', '8', 'bold'), bg='blue',
fg='white')
self.bt_facebook.place(relx=0.35, rely=0.2,
relwidth=0.25, relheight=0.1)
self.bt_insta = Button(text="Instagram", bd=2,
command=self.insta,
font=('verdana', '8', 'bold'), bg='purple',
fg='white')
self.bt_insta.place(relx=0.35, rely=0.4,relwidth=0.25, relheight=0.1) self.bt_youtube = Button(text="Youtube", bd=2,command=self.youtube,
font=('verdana', '8', 'bold'), bg='red',
fg='white')
self.bt_youtube.place(relx=0.35, rely=0.6, relwidth=0.25, relheight=0.1) self.bt_twitter = Button(text="Twitter", bd=2, command=self.twitter,
font=('verdana', '8', 'bold'),
bg='#00ffff',fg='white')
self.bt_twitter.place(relx=0.35, rely=0.8, relwidth=0.25, relheight=0.1) def facebook(self):
webbrowser.open("www.facebook.com")
def insta(self):
webbrowser.open("www.instagram.com")
def youtube(self):
webbrowser.open("www.youtube.com")
def twitter (self):
webbrowser.open("www.twitter.com")
redessociais()
0