Color one line in a scintilla gadget
Posted: Thu Apr 13, 2023 7:40 pm
Hello,
I'm totally new to Scintilla. I need it for an editor field that shows me where an error is within a text file (which I cannot autocorrect). How do I color a single line in another color? I'm reading through the online documentation, but it's a lot of stuff and I don't know which is the right way: using a style or, which I suspect, using an indicator?
Slightly modified source from the help. Help with coloring or somehow highlighting the second line would be appreciated (finally I need to highlight several lines, but I guess I will understand it from doing it with one).
I'm totally new to Scintilla. I need it for an editor field that shows me where an error is within a text file (which I cannot autocorrect). How do I color a single line in another color? I'm reading through the online documentation, but it's a lot of stuff and I don't know which is the right way: using a style or, which I suspect, using an indicator?
Code: Select all
If OpenWindow(0, 0, 0, 330, 90, "ScintillaGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If InitScintilla()
ScintillaGadget(0, 10, 10, 320, 70, 0)
*Text = UTF8("This is a simple ScintillaGadget with text..."+#LF$+"More text"+#LF$+"Even more text!")
ScintillaSendMessage(0, #SCI_SETTEXT, 0, *Text)
FreeMemory(*Text)
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf