Curso de Programación en Python/Input-5
Ir a la navegación
Ir a la búsqueda
Input-5.py
#!/usr/bin/python3
#-*-coding: utf-8 -*-
import tkinter
from tkinter import ttk
root = tkinter.Tk()
style = ttk.Style()
style.map( "C.TButton",
foreground=[('pressed', 'red'), ('active', 'blue')],
background=[('pressed', '!disabled', 'black'), ('active', 'white')]
)
colored_btn = ttk.Button( text="Prueba", style="C.TButton" ).pack()
root.mainloop()