Curso de Programación en Python/Input-6
Ir a la navegación
Ir a la búsqueda
Input-6.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.layout( "TMenubutton", [
11 ( "Menubutton.background", None ),
12 ( "Menubutton.button", {"children":
13 [( "Menubutton.focus", {"children":
14 [( "Menubutton.padding", {"children":
15 [( "Menubutton.label", {"side": "left", "expand": 1} )]
16 } )]
17 } )]
18 } ),
19 ] )
20
21 mbtn = ttk.Menubutton( text='Mucho Texto' )
22 mbtn.pack()
23 root.mainloop()