• Login
Community
  • Login

Smart highlighting foreground color

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
10 Posts 2 Posters 2.3k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    dreamforceinc
    last edited by May 30, 2018, 9:34 AM

    Hi All!
    I use a “SCI_SENDMSG 2067 1 16777215” startup macros for adjusting foreground color of selected text.
    What a scintilla message I need to use for adjusting a smart highlight foreground color? I tried SCI_SETADDITIONALSELFORE message (sci_sendmsg 2600 1 16777215) but it has no effect.
    Screenshot

    C 1 Reply Last reply May 30, 2018, 11:16 AM Reply Quote 0
    • C
      Claudia Frank @dreamforceinc
      last edited by Claudia Frank May 30, 2018, 11:16 AM May 30, 2018, 11:16 AM

      @dreamforceinc

      SCI_INDICSETFORE = 2082
      SCE_UNIVERSAL_FOUND_STYLE_SMART = 29
      color = whatever you want

      So something like

      SCI_SENDMSG 2082 29 16777215

      But I haven’t searched whether the smart highlighting indicator
      gets reset at some point.

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • D
        dreamforceinc
        last edited by May 30, 2018, 12:12 PM

        Nope. It dosn’t work.

        C 1 Reply Last reply May 30, 2018, 12:15 PM Reply Quote 0
        • C
          Claudia Frank @dreamforceinc
          last edited by May 30, 2018, 12:15 PM

          @dreamforceinc

          did you just test the call in general as it seems to work for me.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          • D
            dreamforceinc
            last edited by dreamforceinc Jun 2, 2018, 1:09 PM Jun 2, 2018, 1:08 PM

            Screenshot-1
            Screenshot-2
            or I dont understand something?

            C 1 Reply Last reply Jun 2, 2018, 1:27 PM Reply Quote 0
            • C
              Claudia Frank @dreamforceinc
              last edited by Jun 2, 2018, 1:27 PM

              @dreamforceinc

              hmmm, no I don’t see the error in the moment.
              If I do this, it works.

              before

              and after sending the call

              You won’t see changes in the dialog as you bypass notepad++ with this kind
              of actions.

              Cheers
              Claudia

              1 Reply Last reply Reply Quote 0
              • D
                dreamforceinc
                last edited by dreamforceinc Jun 2, 2018, 2:04 PM Jun 2, 2018, 2:04 PM

                @Claudia-Frank said:

                SCI_SENDMSG 2082 29 16777215

                hmmm…
                it works: screenshot
                but why this call named “sci_indicsetFORE” if background color was changed?
                where I can read about “SCE_UNIVERSAL_FOUND_STYLE_SMART”? I didnt find any info on scintilla.org webpage.
                “SCI_INDICSETFORE” message is reset when I open a new document in a new tab.
                So, maybe the author will add the setting of this option (and also “SCI_SETSELFORE” - because if I move an opened document to another view this color also reset) to the style configurator?
                Thanx!

                C 1 Reply Last reply Jun 2, 2018, 2:26 PM Reply Quote 0
                • C
                  Claudia Frank @dreamforceinc
                  last edited by Claudia Frank Jun 2, 2018, 2:29 PM Jun 2, 2018, 2:26 PM

                  @dreamforceinc

                  ok - strange why it didn’t work in first place.
                  SCE_UNIVERSAL_FOUND_STYLE_SMART is a notepad++ constant which is used as
                  the indicator id.

                  “SCI_INDICSETFORE” message is reset when I open a new document in a new tab.

                  yes, I guess so - in order to make this work you have to find a way to act on a bufferactivated event
                  (notepad++ event) - not sure if NppExec supports this.

                  So, maybe the author will add the setting of this option (and also “SCI_SETSELFORE” - because if I move an opened document to another view this color also reset) to the style configurator?

                  I haven’t searched the github but you might consider this .

                  Cheers
                  Claudia

                  edit:

                  but why this call named “sci_indicsetFORE” if background color was changed?

                  You change the foreground color of an indicator which is basically on top of the surface background.

                  1 Reply Last reply Reply Quote 0
                  • D
                    dreamforceinc
                    last edited by dreamforceinc Jun 3, 2018, 7:47 AM Jun 3, 2018, 7:46 AM

                    Will the “SCI_INDICSETSTYLE ” help me to change the text color inside the “smarthighlighted” box (INDIC_TEXTFORE)?
                    I dont understand what string I need write to change the style.

                    C 1 Reply Last reply Jun 3, 2018, 8:24 PM Reply Quote 0
                    • C
                      Claudia Frank @dreamforceinc
                      last edited by Jun 3, 2018, 8:24 PM

                      @dreamforceinc

                      yes, but then you won’t have the rectangular anymore.
                      You need to call it like SCI_INDICSETSTYLE(29, 17)
                      17 = TEXTFORE
                      and 29 you already know :-)

                      Btw. this is the only way, I guess to use an bultin lexer and add additional syntax coloring.

                      Cheers
                      Claudia

                      1 Reply Last reply Reply Quote 1
                      4 out of 10
                      • First post
                        4/10
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors