python - tkinter listbox display problems -


i've been trying listbox work, however, i've had no success @ all. box appears, , data too... together. have list looks this:

lst=["item1","\n","item2","\n","item3","\n"] 

my listbox code looks this:

s="" x in lst:     s+=str(x)  itemlist=listbox(window) itemlist.insert(0,s) itemlist.place(x=100,y=120) 

the problem is, when run it, listbox displays joinlist, this:

item1item2item3 

is there way listbox work in displaying each item this:

item1 item2 item3 

according effbot, have insert each item separately, rather inserting 1 large string. using append build list works in similar way.

lst=["item1","item2","item3"]  itemlist=listbox(window) item in lst:     itemlist.insert(end,item) itemlist.place(x=100,y=120) 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -