Discussion:
[Notepad-plus-plus] [notepad-plus - Open Discussion] How to set the color of a bookmarked line?
SourceForge.net
2009-09-03 03:29:19 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7605801
By: acos21

Where can i set the background color of a line i bookmarked?

It used to be yellow by default in an older version of Notepad++.

Cant find an entry for it in styler configurator or stylers.xml.

With Preferences > Edit Cimponents -> Display Bookmark Margin the bookmarked
line
is displayed with a bullet but i want the whole line to be visually marked.

Any ideas?

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331753
SourceForge.net
2009-09-03 09:46:40 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7606604
By: cchris

The following macro definitions are to be inserted in shortcuts.xml between
<Macros> and </Macros>, preferrably right after the former or before the latter.
Please read the termùinal section of
http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Configuration
_Files for a detailed how-to. Using a different editor is the simplest way,
but is not necessary.

The folowing will change the backgrounnd color for the ookmark marker:
<Macro name="bookmark_bk" Ctrl="yes" Alt="yes" Shift="no" Key="100">
<Action type="0" message="2041" wParam="24" lParam="<your_color>"
sParam=""/>
</Macro>

<your_color> is the decimal value of a RGB color representation, lke in HTML.
That would be 255 for full blue, for instance.

Change 2041 to 2042 and you'll adjust the foreground color. You can also change
the translucency of the background.

Instead of disabling the bookmark margin, which will also show hidde line marks
as background and confuse Compare, you ay want to prevent the bookmark being
displayed on that margin, leaving other markers alone. The macro to do this is
<Macro name="bookmark_to_bk" Ctrl="yes" Alt="yes" Shift="no" Key="100">
<Action type="0" message="2244" wParam="1" lParam="12582912" sParam=""/>
</Macro>
and this one brings it back
<Macro name="bookmark_to_mgn" Ctrl="yes" Alt="yes" Shift="no" Key="100">
<Action type="0" message="2244" wParam="1" lParam="29360128" sParam=""/>
</Macro>

CChris

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331753
SourceForge.net
2009-09-03 19:18:06 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7607658
By: acos21

I mean this code:

<Macro name="bookmark_bk" Ctrl="yes" Alt="yes" Shift="no" Key="100">
<Action type="0" message="2041" wParam="24" lParam="225" sParam=""/>
</Macro>

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331753
SourceForge.net
2009-09-03 20:43:53 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7607828
By: acos21

Ok, ive investigated it a bit further (im new to this so be patient):

The 2042 thingy calls the scintilla engine 's MarkerSetBack to set the background
color as specified in lparam. This is basicly the idea right?

Doesnt seem to work, ive tried it with and without loading stylers.xml but i
dont seem to be able to change the background color of the line. Im using the
latest version of NPP.
How do i set the transparancy?

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331753
SourceForge.net
2009-09-03 23:52:30 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7608130
By: cchris

By setting the message field to "2476" and lParam to the opacity index, between
0 (invisible) and 255 (fully opaque).

As you figured out, the idea is to use the macro playback engine to send messsages
to Scintilla.

I'll see tomorrow what could be wrong, the code is right, and, if you see the
macro in your macro menu, your edit was succesful.

CChris

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331753
SourceForge.net
2009-09-04 00:21:06 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7608155
By: acos21

Great., would really appreciate that!

Ive been using npp at least 5 hours a day for the last 3 years and since this
feature dissapeared during an update i just cant let it go!


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331753
SourceForge.net
2009-09-04 01:12:02 UTC
Permalink
Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7608195
By: acos21

<Macro name="bookmark_to_bk" Ctrl="yes" Alt="no" Shift="no" Key="32">
<Action type="0" message="2042" wParam="24" lParam="240050190" sParam="" />
<Action type="2" message="0" wParam="43005" lParam="0" sParam="" />
</Macro>

Yeehee..It works: there was a conflict with the Bookmark margin.

Also i removed the CTRL-SPACE toggle i defined for a bookmark from the Shortcut
mapper
and inserted the 43005 Scint. Mark command into the macro which i mapped to
CTRL-SPACE.

Thank you!


______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=331753

Continue reading on narkive:
Loading...