Its possible, to change the color of characters line by line in a Text widgets?
See:
"characters of line1" #color of this line is red
"characters of line2" #color of this line is green
....
Use "foreground" option for text widget with 'configure' method..
Using configure() method with '-foreground' option, you can set the text color for entire text box. I don't think that can be used to set color for each line of data in textbox.
Using configure() method with '-foreground' option, you can set the text color for entire text box. I don't think that can be used to set color for each line of data in textbox.
This can be done. Try the following approach:
Expand|Select|Wrap|Line Numbers
$tx->tag(qw/configure color1 -foreground red/);
$tx->tag(qw/configure color2 -foreground green/);
$tx->tag(qw/configure color3 -foreground blue/);
$tx->tag(qw/configure color4 -foreground black/);
$tx->insert('insert', "characters of line1\n", 'color1');
$tx->insert('insert',"characters of line2\n", 'color2');
$tx->insert('insert',"characters of line3\n", 'color3');
$tx->insert('insert',"characters of line4\n", 'color4');