Tkinter Listbox - Different Text colors in one listbox

kyosohma at gmail.com kyosohma at gmail.com
Tue May 29 14:16:09 EDT 2007


On May 29, 12:02 pm, rahulna... at yahoo.com wrote:
> Hi,
> Is it possible to have different items in a listbox in different
> colors? Or is it just one color for all items in a listbox?
> Thanks
> Rahul

Looks like it has to be the same color and font:
http://www.pythonware.com/library/tkinter/introduction/listbox.htm

Maybe there's a custom listbox in the PMW or Tix modules?

It would appear that wxPython has a control that does allow different
colors (and likely, fonts) called wx.HtmlListBox. I assume it would
allow any kind of html, although I've never played with it for sure.
The demo seems to imply that though.

Mike




More information about the Python-list mailing list