Current line box
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Current line box
Textpad version 8.13 shows the current line in the file by displaying a box of dashed lines.
How do I disable the box completely and just use the background colour to highlight the current line?
How do I disable the box completely and just use the background colour to highlight the current line?
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
Explain why the box is a problem
Yes that helps visually, but changing the colour of the box does not remove the box.
With a standard fixed width 10 point font - such as "Consolas" or "Courier New" - the bottom edge of the box overwrites underscore characters and makes them look like spaces. When writing code, this is a serious problem.
The effect can be mitigated by altering the font size, but 11 point "Consolas" is just too large for my screen. Changing the font can also work, but 10 point "Liberation Mono" is not very clean. 10 point "Lucida Console" has the opposite effect - the box blanks the top of tall characters. 11 point "Lucida Console" loses the tail of descenders as well as the tops.
So, I need to completely stop the box being displayed at all.
Is there any option to do that - however "dirty"?
The correct fix would be to add an option to the Document Class to disable the box effect.
A viable fix would be to make the box height (and vertical position) adjust to the current font height, so that the box edges are always positioned in the whitespace between the lines. Then we could select the box colour so that it is effectively hidden without losing parts of the characters.
With a standard fixed width 10 point font - such as "Consolas" or "Courier New" - the bottom edge of the box overwrites underscore characters and makes them look like spaces. When writing code, this is a serious problem.
The effect can be mitigated by altering the font size, but 11 point "Consolas" is just too large for my screen. Changing the font can also work, but 10 point "Liberation Mono" is not very clean. 10 point "Lucida Console" has the opposite effect - the box blanks the top of tall characters. 11 point "Lucida Console" loses the tail of descenders as well as the tops.
So, I need to completely stop the box being displayed at all.
Is there any option to do that - however "dirty"?
The correct fix would be to add an option to the Document Class to disable the box effect.
A viable fix would be to make the box height (and vertical position) adjust to the current font height, so that the box edges are always positioned in the whitespace between the lines. Then we could select the box colour so that it is effectively hidden without losing parts of the characters.
Here's the trick:
I noticed this doesn't help your problem if you use Courier New; the dotted box still overwrites underscore characters. But Consolas 10 point seems to be okay.
- Set the Background colour to whatever you want the highlight to be.
- Set the Foreground colour to the same colour as the background.
- In the Foreground colour drop-down, click More Colors.
- On the Custom tab, change one of the Red, Green or Blue values by 32.
I noticed this doesn't help your problem if you use Courier New; the dotted box still overwrites underscore characters. But Consolas 10 point seems to be okay.
This issue is an artefact of code that TextPad has had since 1995 to handle old monitors which could only display 16 or 256 colors. That code has now been excised, so setting the same foreground and background colors suppresses the box, as intended. This will be available soon. Hope nobody still has such a monitor!
- Mr. Code Monkey
- Posts: 24
- Joined: Thu Jul 30, 2009 4:59 am
- Mr. Code Monkey
- Posts: 24
- Joined: Thu Jul 30, 2009 4:59 am
No it did not fix the problem. The release notes said: "When the foreground and background colors were the same, the current line should not have been highlighted with a box."
I updated TextPad and the problem was still there. Setting *BOTH* foreground and background to the highlight color worked around it -- but that makes no sense and it's only when I saw this thread that I tried it.
Normally foreground color would imply text color -- meaning that having FG and BG the same would render the text invisible, like in HTML and every other text editor.
The correct fix is for the box not to show at all. Or to be switchable via a separate option than the "highlight line" option.
It's even worse that the "highlight the line" option is global, but the color kludge-around must be done in each document class.
I updated TextPad and the problem was still there. Setting *BOTH* foreground and background to the highlight color worked around it -- but that makes no sense and it's only when I saw this thread that I tried it.
Normally foreground color would imply text color -- meaning that having FG and BG the same would render the text invisible, like in HTML and every other text editor.
The correct fix is for the box not to show at all. Or to be switchable via a separate option than the "highlight line" option.
It's even worse that the "highlight the line" option is global, but the color kludge-around must be done in each document class.
You have misunderstood how this works for current line highlighting. If the foreground and background colors are different, the background of the current line will be painted with the selected background color and a dotted line will be drawn around it in the foreground color. The dotted line will not be drawn if both colors are the same. If you don't want any highlighting, set both colors to the window background color.
- Mr. Code Monkey
- Posts: 24
- Joined: Thu Jul 30, 2009 4:59 am
I want highlighting (color) but no box. I'm glad that that is once again possible, but the FB/BG stuff is counter-intuitive and non-standard -- hence the "misunderstanding". (Which is really a design/documentation/help error.)
But at least this thread is here now, so other people will have an easier time working around the problems.
But at least this thread is here now, so other people will have an easier time working around the problems.
Magic
I too dislike "magic" side-effects like this.
It would be safer / friendlier / better to have a tick-box option associated with the class to turn off the box effect.
However, 8.13 was updated very quickly, the magic work-around does work and the forum does have information about resolving the issue.
It would be safer / friendlier / better to have a tick-box option associated with the class to turn off the box effect.
However, 8.13 was updated very quickly, the magic work-around does work and the forum does have information about resolving the issue.
The last version of TextPad I used before upgrading to 8.14.0 was 8.12.0. My FG/BG colors are white/black respectively. My line hilite color has been a charcoal gray since version 7. This is the first time I've had the dashed outline around the current line. Selected lines are still the way I want them, but the current line has that awful dashed outline around it. Please add a property that allows us to disable that outline.