miércoles, 25 de abril de 2018

Programa carita, ocultando un botón en python

import tkinter as tk
from tkinter import *
ventana = tk.Tk()
ventana.geometry('400x400')
ventana.config(bg="black")
ventana.title("Mostrando y ocultando un botón con una imagen")

def btn_hide():
    if b1.winfo_ismapped():
        b1.place_forget()
        b2.configure(text="Mostrar carita", width=15)
    else:
        b1.place(x=70, y=50)
        b2.configure(text="Ocultar carita", width=15)

imgBoton = PhotoImage(file="pensando.gif_c200")
b1 = tk.Button(ventana, text="Botón 1", image=imgBoton, fg="black", width=200)
b1.place(x=90, y=50)
b2 = tk.Button(ventana, text="Ocultar carita", command=btn_hide, fg="black", width=15)
b2.place(x=130, y=280)

ventana.mainloop()

Programas presentados el día 19 de abril del 2018

https://drive.google.com/file/d/1nGp5NjHlnnOspJE4cAGqWHdX4Fs-tm_t/view?usp=sharing
Psy - Gangnam Style Psy - Gangnam Style Animated Rainbow Nyan Cat Animated Rainbow Nyan CatDancing Banana/* Start http://www.cursors-4u.com */ body, a:hover {cursor: url(http://cur.cursors-4u.net/food/foo-2/foo112.ani), url(http://cur.cursors-4u.net/food/foo-2/foo112.png), progress !important;} /* End http://www.cursors-4u.com */Animated Rainbow Nyan Cat