Curso de Programación en Python/Input-7

De WikiCabal
Ir a la navegación Ir a la búsqueda

Input-7.py

 1 #!/usr/bin/python3
 2 #-*-coding: utf-8 -*-
 3 
 4 from tkinter import ttk
 5 import tkinter
 6 
 7 root = tkinter.Tk()
 8 
 9 style = ttk.Style()
10 style.theme_settings( "default", {
11    "TCombobox": {
12        "configure": {"padding": 5},
13        "map": {
14            "background": [( "active", "green2" ),
15                           ( "!disabled", "green4" )],
16            "fieldbackground": [( "!disabled", "green3" )],
17            "foreground": [( "focus", "OliveDrab1" ),
18                           ( "!disabled", "OliveDrab2" )]
19        }
20    }
21 } )
22 
23 combo = ttk.Combobox().pack()
24 
25 root.mainloop()

Resultado

Input-7.png