Tkinter == Label / Msg only have 1 item in the list.How to solve?

0

Well, the goal is to have all the items in the list in the same label or msg appear. I'm not very experienced at Tkinter, so I do not know if there's a limit to that. Here is some of the code below.

prod=['Exemplo-10.00','Exemplo2-20.00','Exemplo3-30.00']
##
def create_window():
    top = tk.Toplevel()
    top.title('Tabela de Preços')
    h=Message(top, width=310 , text='' )
    h.place(x=50,y=50)
    h.config(font=('Courier', 20))
    h.pack()
    def listagem():
        for i in prod:
            yo=int(i.find('-'))
            h['text']=str(i[0:yo]+'.......'+str(i[yo:-1]))
    bto=Button(top, width=22 , height=2 ,text='Clique para mostrar a tabela', command=listagem)
    bto.place(x=0,y=5)
    bto.pack()
    top.geometry('400x600+300+60')
    
asked by anonymous 15.10.2017 / 23:23

0 answers