SCI_SETLEXER does not work for me.

40 views
Skip to first unread message

Martin Rotter

unread,
Nov 9, 2017, 3:14:49 PM11/9/17
to scintilla-interest
I use scintilla in my hobby qt project.

I created new ScintillaEdit instance in my qt project and call

setLexerLanguage("cpp");
clearDocumentStyle();

on it. But it just seems that no lexer gets "activated" at all. I see no syntax highlightinga nd no folding. When I call lexerLanguage() afterwards, I get "cpp" which is expected.

Am I missing anything obvious here?

Neil Hodgson

unread,
Nov 9, 2017, 4:03:06 PM11/9/17
to Scintilla mailing list
Martin Rotter:

> setLexerLanguage("cpp");
> clearDocumentStyle();
>
> on it. But it just seems that no lexer gets "activated" at all. I see no syntax highlightinga nd no folding.

Assign visual attributes, like colours, to styles.

Neil

Martin Rotter

unread,
Nov 10, 2017, 1:41:05 AM11/10/17
to scintilla-interest
I will try, thanks.

Dne čtvrtek 9. listopadu 2017 22:03:06 UTC+1 Neil Hodgson napsal(a):

Martin Rotter

unread,
Nov 10, 2017, 8:39:08 AM11/10/17
to scintilla-interest
So, yes, your suggestion helped me.

Sample code: https://github.com/martinrotter/textilosaurus/blob/original-scintilla/src/gui/texteditor.cpp#L116

Dne čtvrtek 9. listopadu 2017 21:14:49 UTC+1 Martin Rotter napsal(a):
Reply all
Reply to author
Forward
0 new messages