Sure, just set the (appropriately named) -background option to whatever you want.
#!/usr/bin/perl use warnings; use strict; use Tk; my $top = MainWindow->new; my @color = qw/red yellow pink green purple orange blue/; my $listbox = $top->Scrolled('Listbox')->pack; for (0..99){ $listbox->insert('end',$_); $listbox->itemconfigure($_, -background => $color[rand(@color)]); } MainLoop;
In reply to Re: tk listbox entry background color
by thundergnat
in thread tk listbox entry background color
by JSlice
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |