Margin background color for current line

262 views
Skip to first unread message

Farshid Lashkari

unread,
Oct 9, 2012, 1:52:11 PM10/9/12
to scintilla...@googlegroups.com
Hi,

I've been playing around with the Sublime text editor (http://www.sublimetext.com/) lately. It has a lot of neat features, I suggest taking a look at it. One feature it has, that I'd like to add to my application, is changing the margin background color for the current line. It works similar to the SCI_SETCARETLINEBACK command, but only affects the margin. Is this currently possible with scintilla? I know how to control the background color of the margin, but it affects all the lines.

Cheers,
Farshid

Lex Trotman

unread,
Oct 9, 2012, 7:10:40 PM10/9/12
to scintilla...@googlegroups.com
On 10 October 2012 04:52, Farshid Lashkari <fla...@gmail.com> wrote:
Hi,

I've been playing around with the Sublime text editor (http://www.sublimetext.com/) lately. It has a lot of neat features, I suggest taking a look at it. One feature it has, that I'd like to add to my application, is changing the margin background color for the current line. It works similar to the SCI_SETCARETLINEBACK command, but only affects the margin. Is this currently possible with scintilla? I know how to control the background color of the margin, but it affects all the lines.

Use MARGINSETSTYLE to set the background per line.

Cheers
Lex 

Cheers,
Farshid

--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To view this discussion on the web visit https://groups.google.com/d/msg/scintilla-interest/-/rrwCwPyU1iQJ.
To post to this group, send email to scintilla...@googlegroups.com.
To unsubscribe from this group, send email to scintilla-inter...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scintilla-interest?hl=en.

Farshid Lashkari

unread,
Oct 10, 2012, 1:18:59 PM10/10/12
to scintilla...@googlegroups.com
Hi Lex,

On Tuesday, October 9, 2012 4:10:42 PM UTC-7, Lex Trotman wrote:
Use MARGINSETSTYLE to set the background per line.

The documentation seems to imply that MARGINSETSTYLE only applies to text margins. Will it work with line number and symbols margins?

Cheers,
Farshid

Neil Hodgson

unread,
Oct 13, 2012, 6:38:54 AM10/13/12
to scintilla...@googlegroups.com
Farshid Lashkari:

I've been playing around with the Sublime text editor (http://www.sublimetext.com/) lately. It has a lot of neat features, I suggest taking a look at it. One feature it has, that I'd like to add to my application, is changing the margin background color for the current line. It works similar to the SCI_SETCARETLINEBACK command, but only affects the margin. Is this currently possible with scintilla? I know how to control the background color of the margin, but it affects all the lines.

   You would need to track the caret and use a marker. Maybe a translucent pixmap of the same size as the margin.

   Neil

Reply all
Reply to author
Forward
0 new messages