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.
    • dreamforceincD
      dreamforceinc
      last edited by

      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

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @dreamforceinc
        last edited by Claudia Frank

        @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
        • dreamforceincD
          dreamforceinc
          last edited by

          Nope. It dosn’t work.

          Claudia FrankC 1 Reply Last reply Reply Quote 0
          • Claudia FrankC
            Claudia Frank @dreamforceinc
            last edited by

            @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
            • dreamforceincD
              dreamforceinc
              last edited by dreamforceinc

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

              Claudia FrankC 1 Reply Last reply Reply Quote 0
              • Claudia FrankC
                Claudia Frank @dreamforceinc
                last edited by

                @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
                • dreamforceincD
                  dreamforceinc
                  last edited by dreamforceinc

                  @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!

                  Claudia FrankC 1 Reply Last reply Reply Quote 0
                  • Claudia FrankC
                    Claudia Frank @dreamforceinc
                    last edited by Claudia Frank

                    @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
                    • dreamforceincD
                      dreamforceinc
                      last edited by dreamforceinc

                      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.

                      Claudia FrankC 1 Reply Last reply Reply Quote 0
                      • Claudia FrankC
                        Claudia Frank @dreamforceinc
                        last edited by

                        @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
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors