Want to change the background color of the current line

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
User avatar
Dick7
Posts: 24
Joined: Mon Feb 02, 2004 6:55 am

Want to change the background color of the current line

Post by Dick7 »

This is for text files.

Thanks
Dick
User avatar
Nicholas Jordan
Posts: 124
Joined: Mon Dec 20, 2004 12:33 am
Location: Central Texas ISO Latin-1
Contact:

Preferences

Post by Nicholas Jordan »

Configure/Preferences/Document Classes/Default/Colors
Configure/Preferences/Document Classes/HTML/Colors
Configure/Preferences/Document Classes/JavaScript/Colors
Configure/Preferences/Document Classes/HotHarold/Colors

There is no HotHarold programming language, but you can put the one you want there.
User avatar
Dick7
Posts: 24
Joined: Mon Feb 02, 2004 6:55 am

Re: Preferences

Post by Dick7 »

Nicholas Jordan wrote:Configure/Preferences/Document Classes/Default/Colors
Configure/Preferences/Document Classes/HTML/Colors
Configure/Preferences/Document Classes/JavaScript/Colors
Configure/Preferences/Document Classes/HotHarold/Colors

There is no HotHarold programming language, but you can put the one you want there.
How is that an answer to my question?
Dick
User avatar
Nicholas Jordan
Posts: 124
Joined: Mon Dec 20, 2004 12:33 am
Location: Central Texas ISO Latin-1
Contact:

Post by Nicholas Jordan »

well I can go look to be sure, I may have posted in haste but the Color dialog of every editor I have seen that allows text coloring allows setting the background color as well. Look at it for a little while, I may be missing it but that would be the usual answer to your question.
User avatar
Alan-LB
Posts: 22
Joined: Sat Feb 02, 2008 4:29 am
Location: Junee, NSW, Australia

Post by Alan-LB »

As Nicholas says, select Colors for whatever file type you want (eg Java or Text) then select "Current Line" from the list. Then you can select foreground and background colors.

I lost the entry in my list because it had been set to White on White :)

Alan
User avatar
Dick7
Posts: 24
Joined: Mon Feb 02, 2004 6:55 am

Post by Dick7 »

Alan-LB wrote: I lost the entry in my list because it had been set to White on White :)

Alan
That's the answer!

Thanks, Alan
Dick
fossildoc
Posts: 2
Joined: Fri Jan 28, 2011 5:09 am

Post by fossildoc »

There seems to be a bug in the Preferences dialog for color. Here's how to see it: put some text in a window and select a line, then go to Configure | Preferences | Document Classes | Text | Colors. Select the first line, Window background, and set it to light gray, then click Apply. The entire window will go gray except the current line, which has a white background.

Then scroll the color list to Current Line. It will show a yellow foreground and a gray background, both of which are wrong. The Apply button will be inactive. Select the Background dropdown list and re-select the same shade of gray. The Apply button will still be inactive.

To work around this, set the Current Line background color to something else, like red, and Apply. Then set it to the (e.g.) gray you want, then Apply again, and everything will be work as intended.

Background should mean Background, not Background Except For The Current Line, IMO.
ak47wong
Posts: 703
Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia

Post by ak47wong »

The intended behaviour seems to be that the "Window background" colour applies to all the items except those for which a different background colour has been selected. For example, if you change "Brackets" to have a red background and then change the window background to light blue, your brackets will still have a red background, even though most other items will now have a light blue one.

By default, "Window background" is white, but "Current line", "Selected text" and "Selected text (no focus)" have a different background colour set. The default "Current line" background is RGB(255,251,240), a very light orange, which is why it appears to remain "white" when you change the window background to light grey.

I can reproduce the bug you described though. When you select a "Window background" colour, all the items in the dialog reflect that colour, even though the items for which a different background colour has been selected should not.
Post Reply