<[EMAIL PROTECTED]> wrote:

> On May 29, 2:02 pm, [EMAIL PROTECTED] wrote:
> > Hi,
> > Is it possible to havedifferentitems in alistboxindifferentcolors? Or is it
justonecolor for all items in alistbox?
> > Thanks
> > Rahul
>
> from Tkinter import *
>
> root = Tk()
> l = Listbox(root)
> l.pack()
> for x in range(10):
>     l.insert(END, x)
> l.itemconfig(2, bg='red', fg='white')
> l.itemconfig(4, bg='green', fg='white')
> l.itemconfig(5, bg='cyan', fg='white')
> root.mainloop()
>
> You can _only_ configurate 'background', 'foreground',
> 'selectbackground', 'selectforegroud', not font :(

Live and learn, - was not aware you could do this - thanks, nice one.

- Hendrik

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to