Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox with varying bkgd and frgd colors from row to row

Status
Not open for further replies.

DrA10101

Programmer
Jun 10, 2003
8
0
0
US
Hi,

I would like to use a listbox with varying background and foreground colors from row to row. Can it be done?

Thanks in advance. All help is appreciated.

- Craig
 
There is some rudimentary support for this with the listbox widget. Check out the listbox itemconfigure operation, and the various attributes that you can set on a per-item basis. However, this isn't particularly robust, especially if you're updating the contents of the listbox frequently.

In addition to the Hugelist megawidget that ulis mentioned, there are some other extensions that you might consider. The tablelist megawidget is actually a mutli-column listbox, with several nice features including column headers and integrating sorting ability. You can find out more about it on the Tcl'ers Wiki ( on the page Another extension that's getting a lot of attention is the TkTreeCtrl. Although it is intended primarily for hierarchical, tree-style display, it can also present information in a "flat" format. It has a very attractive display, but I've found it quite difficult to use in practice. I'd like to see its API simplified so that it's a lot easier to use in simple cases. But you can find out more about it at
- Ken Jones, President, ken@avia-training.com
Avia Training and Consulting, 866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top