Smart highlighting foreground color



  • 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



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



  • Nope. It dosn’t work.



  • @dreamforceinc

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

    Cheers
    Claudia



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



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



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



  • @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.



  • 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.



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


Log in to reply