--- El sáb, 7/17/10, Oswall Verny Arguedas C. <[email protected]> escribió:
> De: Oswall Verny Arguedas C. <[email protected]> > Asunto: [Python-es] Cómo desplegar un ttk.TreeView > A: "Python-es Python.ORG" <[email protected]> > Fecha: sábado, 17 de julio de 2010, 02:03 pm > Saludos, > Estoy con python 2.6.5 y tratando de desplegar un TreView > en el grid del Frame, pero no encuentro > como. Debido a que NO tiene un método por > ejemplo: tree.grid(column=1, row=1, > sticky=W) > > La pregunta es cómo lo despliego en el grid del Frame? > > Pongo un ejemplo básico de código: > > > from Tkinter import * > import ttk > from ttk import * > > root = Tk() > root.title("PROG. EJEMPLO para TreeView") > > mainframe = ttk.Frame(root, padding="3 3 12 12") > mainframe.grid(column=0, row=0, sticky=(N, W, E, S)) > mainframe.columnconfigure(0, weight=1) > mainframe.rowconfigure(0, weight=1) > > > ttk.Label(mainframe, text="EJEMPLO > TREEVIEW").grid(column=1, row=1, sticky=W) > > tree = ttk.Treeview(mainframe) > > #tree.insert('','end','widgets',text='Widget Tour') > #tree.insert('','end','widgets2',text='Widget Tour2') > > tree.insert('','end','gallery', text='Applications') > tree.insert('','end','gallery2', text='Applications2') > tree.insert('','end','gallery3', text='Applications3') > > root.mainloop() > > > > > _______________________________________________ > Python-es mailing list > [email protected] > http://mail.python.org/mailman/listinfo/python-es > FAQ: http://python-es-faq.wikidot.com/ > Saludos, Me contesto yo mismo. en una linea aparte tree.grid(column=1, row=3 sticky=W) _______________________________________________ Python-es mailing list [email protected] http://mail.python.org/mailman/listinfo/python-es FAQ: http://python-es-faq.wikidot.com/
