colintu has asked for the wisdom of the Perl Monks concerning the following question:
I have a Text widget in which I need to mark 'invalid' characters by changing their colour. This works except for two cases:
If the char is a newline/return then the whole of the rest of the line in the Text widget has it's colour changed rather than just the single char position after the last word.
I am highlighting space characters with a tag. When the text widget word wraps the text all of the remainder of the line is highlighted as if there were multiple spaces filling the end of the line.
It appears that the text widget is treating all of the white space displayed at the end of each word wrapped line as a single character.
Is this expected? Is this a bug? Is there a way of preventing this?
Colin
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tags in TK Text widgets
by tybalt89 (Monsignor) on Aug 17, 2024 at 20:13 UTC | |
by colintu (Acolyte) on Aug 18, 2024 at 07:50 UTC | |
by tybalt89 (Monsignor) on Aug 18, 2024 at 15:39 UTC | |
by colintu (Acolyte) on Aug 18, 2024 at 17:56 UTC | |
by Marshall (Canon) on Aug 18, 2024 at 09:54 UTC | |
|
Re: Tags in TK Text widgets
by Marshall (Canon) on Aug 14, 2024 at 19:13 UTC | |
by colintu (Acolyte) on Aug 15, 2024 at 19:16 UTC | |
by choroba (Cardinal) on Aug 16, 2024 at 10:06 UTC | |
by colintu (Acolyte) on Aug 17, 2024 at 10:32 UTC | |
by hippo (Archbishop) on Aug 17, 2024 at 15:11 UTC | |
| |
by choroba (Cardinal) on Aug 19, 2024 at 09:15 UTC |