Curso de Programación en Python/Input-7

De WikiCabal
Saltar a: navegación, buscar

Input-7.py

#!/usr/bin/python3
#-*-coding: utf-8 -*-

from tkinter import ttk
import tkinter

root = tkinter.Tk()

style = ttk.Style()
style.theme_settings( "default", {
   "TCombobox": {
       "configure": {"padding": 5},
       "map": {
           "background": [( "active", "green2" ),
                          ( "!disabled", "green4" )],
           "fieldbackground": [( "!disabled", "green3" )],
           "foreground": [( "focus", "OliveDrab1" ),
                          ( "!disabled", "OliveDrab2" )]
       }
   }
} )

combo = ttk.Combobox().pack()

root.mainloop()

Resultado

Input-7.png