![scite variable highlight scite variable highlight](https://i1.wp.com/d331tpl5vusgqa.cloudfront.net/wp-content/uploads/2015/10/Syntax-Highlighting1.png)
This function is not really necesary but I made it for convenience. sets position forward to allow searching for next match Sci.SetStyling(strlen(GuiMessage), SCE_AHKL_USERDEFINED1), sci.GoToPos(pos) Change color of length of typed text to style #1, move caret to position. Sci.StartStyling(pos:=Search(sci, newpos ? newpos : 0, sci.GetLength()+1, GuiMessage), 0x1f) 0x1f sets text bits styles, no indicators. sci.SetStyling(sci.GetLength()+1, STYLE_DEFAULT)
![scite variable highlight scite variable highlight](https://cheval-donne.com/dmrvlw/fWUgN1Ewnhw.jpeg)
If !GuiMessage If search box is empty clear all positions to start from the beginning again. Then you use SetStyling with the length of characters you whish to highlight and which style you want to use.Īll other code is just for the sake of demonstration and not really needed. You first have to tell scintilla where you are going to start highlighting and which bits you will highlight. Messages with names of the form SCISETxxxxx often have a companion SCIGETxxxxx.To save tedious repetition, if the SCIGETxxxxx message returns the value set by the SCISETxxxxx message, the SET routine is described and the GET routine is left to your imagination. Gui, Add, Button, x+10 gSearchAgain, Search Again Gui, Add, Edit, x10 y410 w500 -WantReturn vGuiMessage -0x100 gSearch0 Sci.StyleSetFore(SCE_AHKL_USERDEFINED1, 0圎E0000), sci.StyleSetBold(SCE_AHKL_USERDEFINED1, true) Sci.SetText(unused, text), sci.SetReadOnly(true), sci.GrabFocus()
![scite variable highlight scite variable highlight](https://dfsuknfbz46oq.cloudfront.net/p/screenshots/scite-9322dffb-a92b-464a-8056-961a07d91dcc.png)
Sci.SetWrapMode(true), sci.SetLexer(SCLEX_CONTAINER), sci.StyleClearAll() I set some random text in the control, set some styles and use the Search Label together with a simple search function In this case we use SCLEX_CONTAINER to tell scintilla that we will manually do the coloring. In this example we will manually tell scintilla which positions to color.
SCITE VARIABLE HIGHLIGHT HOW TO
This is an example of how to highlight without selecting a pre-existing lexer.