Re: Cannot load a lexer
Roger Tunnicliffe <[email protected]> Sat, 13 Dec 2025 12:44:52 -0800 (PST)
| Newsgroups | gmane.comp.lib.scintilla.devel |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_194654_1208499370.1765658692692
Content-Type: multipart/alternative;
boundary="----=_Part_194655_83210167.1765658692692"
------=_Part_194655_83210167.1765658692692
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Yes Neil, I have the following code which appears to be working...
VAR sci =3D scintilla_new()
scintilla_send_message(sci, SCI_STYLESETBACK, STYLE_DEFAULT, mRGB(33,37,43)=
)=20
' Background Dark
scintilla_send_message(sci, SCI_STYLESETFORE, STYLE_DEFAULT, mRGB(0,255,255=
))=20
' Foreground Cyan
scintilla_send_message(sci, SCI_STYLESETFONT, STYLE_DEFAULT, strptr(
"Consolas")) ' Font style
scintilla_send_message(sci, SCI_STYLESETSIZE, STYLE_DEFAULT, 9) ' Font size
scintilla_send_message(sci, SCI_SETTABWIDTH, STYLE_DEFAULT, 2) ' Tab width
scintilla_send_message(sci, SCI_SETSELBACK, STYLE_DEFAULT, mRGB(38,79,120))=
'=20
Selected Text BGR color BLUISH
scintilla_send_message(sci, SCI_SETSELFORE, STYLE_DEFAULT, &hffffff) '=20
Selected Text FOR color WHITE
scintilla_send_message(sci, SCI_SETCARETFORE,mRGB(255,255,255),0) ' Caret=
=20
Colour
' Propergate thru all styles
scintilla_send_message(sci, SCI_STYLECLEARALL, 0, 0)
' line-number text + background style
scintilla_send_message(sci, SCI_SETMARGINTYPEN, 1, SC_MARGIN_NUMBER)
scintilla_send_message(sci, SCI_SETMARGINWIDTHN, 1, 45)
scintilla_send_message(sci, SCI_STYLESETFORE, STYLE_LINENUMBER, mRGB(86,133=
,
229))
scintilla_send_message(sci, SCI_STYLESETBACK, STYLE_LINENUMBER, mRGB(56,56,
56))
On Saturday, December 13, 2025 at 6:23:09=E2=80=AFPM UTC+11 Neil wrote:
> Roger Tunnicliffe:
>
> > Dim pLexer As Any Ptr =3D CreateLexer("freebasic")
> ...
> > dim R as integer =3D scintilla_send_message(sci, SCI_GETLEXER, NULL,=20
> pLexer)
> >
> > returns a value of 75
>
> That looks good since that is the right ID for freebasic.
> #define SCLEX_FREEBASIC 75
>
> > Correcting SCI_SETILEXER did not provide any Highlighting in Scintilla=
=20
> at all.
>
> Have you defined appearances for the lexical classes?
> SCI_STYLESETFORE and related.
> https://scintilla.org/ScintillaDoc.html#SCI_STYLESETFORE
>
> Neil
>
--=20
You received this message because you are subscribed to the Google Groups "=
scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/scintilla-i=
nterest/b5e91365-ea58-4a33-9027-7d1ca66d1db2n%40googlegroups.com.
------=_Part_194655_83210167.1765658692692
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Yes Neil, I have the following code which appears to be working...<div><br =
/></div><div><div style=3D"color: rgb(204, 204, 204); background-color: rgb=
(31, 31, 31); font-family: "Droid Sans Mono", "monospace&quo=
t;, monospace; font-size: 13px; line-height: 18px; white-space: pre;"><div>=
VAR <span style=3D"color: rgb(156, 220, 254);">sci</span> <span style=
=3D"color: rgb(212, 212, 212);">=3D</span> <span style=3D"color: rgb(220, 2=
20, 170);">scintilla_new</span>()</div><div> <span style=3D"color: rgb=
(220, 220, 170);">scintilla_send_message</span>(<span style=3D"color: rgb(1=
56, 220, 254);">sci</span>,<span style=3D"color: rgb(156, 220, 254);"> SCI_=
STYLESETBACK</span>,<span style=3D"color: rgb(156, 220, 254);"> STYLE_DEFAU=
LT</span>, <span style=3D"color: rgb(220, 220, 170);">mRGB</span>(<span sty=
le=3D"color: rgb(181, 206, 168);">33</span>,<span style=3D"color: rgb(181, =
206, 168);">37</span>,<span style=3D"color: rgb(181, 206, 168);">43</span>)=
) <span style=3D"color: rgb(106, 153, 85);">' Background Da=
rk</span></div><div> <span style=3D"color: rgb(220, 220, 170);">scinti=
lla_send_message</span>(<span style=3D"color: rgb(156, 220, 254);">sci</spa=
n>,<span style=3D"color: rgb(156, 220, 254);"> SCI_STYLESETFORE</span>,<spa=
n style=3D"color: rgb(156, 220, 254);"> STYLE_DEFAULT</span>, <span style=
=3D"color: rgb(220, 220, 170);">mRGB</span>(<span style=3D"color: rgb(181, =
206, 168);">0</span>,<span style=3D"color: rgb(181, 206, 168);">255</span>,=
<span style=3D"color: rgb(181, 206, 168);">255</span>)) <spa=
n style=3D"color: rgb(106, 153, 85);">' Foreground Cyan</span></div><div> =
<span style=3D"color: rgb(220, 220, 170);">scintilla_send_message</span=
>(<span style=3D"color: rgb(156, 220, 254);">sci</span>,<span style=3D"colo=
r: rgb(156, 220, 254);"> SCI_STYLESETFONT</span>,<span style=3D"color: rgb(=
156, 220, 254);"> STYLE_DEFAULT</span>, <span style=3D"color: rgb(220, 220,=
170);">strptr</span>(<span style=3D"color: rgb(206, 145, 120);">"Consolas"=
</span>)) <span style=3D"color: rgb(106, 153, 85);">' Font styl=
e</span></div><div> <span style=3D"color: rgb(220, 220, 170);">scintil=
la_send_message</span>(<span style=3D"color: rgb(156, 220, 254);">sci</span=
>,<span style=3D"color: rgb(156, 220, 254);"> SCI_STYLESETSIZE</span>,<span=
style=3D"color: rgb(156, 220, 254);"> STYLE_DEFAULT</span>, <span style=3D=
"color: rgb(181, 206, 168);">9</span>) <span s=
tyle=3D"color: rgb(106, 153, 85);">' Font size</span></div><div> <span=
style=3D"color: rgb(220, 220, 170);">scintilla_send_message</span>(<span s=
tyle=3D"color: rgb(156, 220, 254);">sci</span>,<span style=3D"color: rgb(15=
6, 220, 254);"> SCI_SETTABWIDTH</span>,<span style=3D"color: rgb(156, 220, =
254);"> STYLE_DEFAULT</span>, <span style=3D"color: rgb(181, 206, 168);">2<=
/span>) <span style=3D"color: rgb(106, 153, 8=
5);">' Tab width</span></div><div> <span style=3D"color: rgb(220, 220,=
170);">scintilla_send_message</span>(<span style=3D"color: rgb(156, 220, 2=
54);">sci</span>,<span style=3D"color: rgb(156, 220, 254);"> SCI_SETSELBACK=
</span>,<span style=3D"color: rgb(156, 220, 254);"> STYLE_DEFAULT</span>, <=
span style=3D"color: rgb(220, 220, 170);">mRGB</span>(<span style=3D"color:=
rgb(181, 206, 168);">38</span>,<span style=3D"color: rgb(181, 206, 168);">=
79</span>,<span style=3D"color: rgb(181, 206, 168);">120</span>)) =
<span style=3D"color: rgb(106, 153, 85);">' Selected Text BGR color=
BLUISH</span></div><div> <span style=3D"color: rgb(220, 220, 170);">s=
cintilla_send_message</span>(<span style=3D"color: rgb(156, 220, 254);">sci=
</span>,<span style=3D"color: rgb(156, 220, 254);"> SCI_SETSELFORE</span>,<=
span style=3D"color: rgb(156, 220, 254);"> STYLE_DEFAULT</span>, <span styl=
e=3D"color: rgb(212, 212, 212);">&</span><span style=3D"color: rgb(156,=
220, 254);">hffffff</span>) <span style=3D"color: =
rgb(106, 153, 85);">' Selected Text FOR color WHITE</span></div><div> =
<span style=3D"color: rgb(220, 220, 170);">scintilla_send_message</span>(<s=
pan style=3D"color: rgb(156, 220, 254);">sci</span>,<span style=3D"color: r=
gb(156, 220, 254);"> SCI_SETCARETFORE</span>,<span style=3D"color: rgb(220,=
220, 170);">mRGB</span>(<span style=3D"color: rgb(181, 206, 168);">255</sp=
an>,<span style=3D"color: rgb(181, 206, 168);">255</span>,<span style=3D"co=
lor: rgb(181, 206, 168);">255</span>),<span style=3D"color: rgb(181, 206, 1=
68);">0</span>) <span style=3D"color: rgb(106, 1=
53, 85);">' Caret Colour</span></div><div> <span style=3D"color: rgb(106=
, 153, 85);">' Propergate thru all styles</span></div><div> <span styl=
e=3D"color: rgb(220, 220, 170);">scintilla_send_message</span>(<span style=
=3D"color: rgb(156, 220, 254);">sci</span>,<span style=3D"color: rgb(156, 2=
20, 254);"> SCI_STYLECLEARALL</span>, <span style=3D"color: rgb(181, 206, 1=
68);">0</span>, <span style=3D"color: rgb(181, 206, 168);">0</span>)</div><=
br /><div> <span style=3D"color: rgb(106, 153, 85);">' line-number text =
+ background style</span></div><div> <span style=3D"color: rgb(220, 22=
0, 170);">scintilla_send_message</span>(<span style=3D"color: rgb(156, 220,=
254);">sci</span>,<span style=3D"color: rgb(156, 220, 254);"> SCI_SETMARGI=
NTYPEN</span>, <span style=3D"color: rgb(181, 206, 168);">1</span>,<span st=
yle=3D"color: rgb(156, 220, 254);"> SC_MARGIN_NUMBER</span>)</div><div> =
<span style=3D"color: rgb(220, 220, 170);">scintilla_send_message</span>(=
<span style=3D"color: rgb(156, 220, 254);">sci</span>,<span style=3D"color:=
rgb(156, 220, 254);"> SCI_SETMARGINWIDTHN</span>, <span style=3D"color: rg=
b(181, 206, 168);">1</span>, <span style=3D"color: rgb(181, 206, 168);">45<=
/span>)</div><div> <span style=3D"color: rgb(220, 220, 170);">scintill=
a_send_message</span>(<span style=3D"color: rgb(156, 220, 254);">sci</span>=
,<span style=3D"color: rgb(156, 220, 254);"> SCI_STYLESETFORE</span>,<span =
style=3D"color: rgb(156, 220, 254);"> STYLE_LINENUMBER</span>, <span style=
=3D"color: rgb(220, 220, 170);">mRGB</span>(<span style=3D"color: rgb(181, =
206, 168);">86</span>,<span style=3D"color: rgb(181, 206, 168);">133</span>=
,<span style=3D"color: rgb(181, 206, 168);">229</span>))</div><div> <s=
pan style=3D"color: rgb(220, 220, 170);">scintilla_send_message</span>(<spa=
n style=3D"color: rgb(156, 220, 254);">sci</span>,<span style=3D"color: rgb=
(156, 220, 254);"> SCI_STYLESETBACK</span>,<span style=3D"color: rgb(156, 2=
20, 254);"> STYLE_LINENUMBER</span>, <span style=3D"color: rgb(220, 220, 17=
0);">mRGB</span>(<span style=3D"color: rgb(181, 206, 168);">56</span>,<span=
style=3D"color: rgb(181, 206, 168);">56</span>,<span style=3D"color: rgb(1=
81, 206, 168);">56</span>))</div><div></div></div><br /></div><div class=3D=
"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">On Saturday, December =
13, 2025 at 6:23:09=E2=80=AFPM UTC+11 Neil wrote:<br/></div><blockquote cla=
ss=3D"gmail_quote" style=3D"margin: 0 0 0 0.8ex; border-left: 1px solid rgb=
(204, 204, 204); padding-left: 1ex;">Roger Tunnicliffe:
<br>
<br>> Dim pLexer As Any Ptr =3D CreateLexer("freebasic")
<br>...
<br>> dim R as integer =3D scintilla_send_message(sci, SCI_GETLEXER, NUL=
L, pLexer)
<br>>
<br>> returns a value of 75
<br>
<br> That looks good since that is the right ID for freebasic.
<br>#define SCLEX_FREEBASIC 75
<br>
<br>> Correcting SCI_SETILEXER did not provide any Highlighting in Scint=
illa at all.
<br>
<br> Have you defined appearances for the lexical classes?
<br>SCI_STYLESETFORE and related.
<br><a href=3D"https://scintilla.org/ScintillaDoc.html#SCI_STYLESETFORE" ta=
rget=3D"_blank" rel=3D"nofollow" data-saferedirecturl=3D"https://www.google=
.com/url?hl=3Den&q=3Dhttps://scintilla.org/ScintillaDoc.html%23SCI_STYL=
ESETFORE&source=3Dgmail&ust=3D1765745041747000&usg=3DAOvVaw0XRx=
62STE17-stT75OFL7w">https://scintilla.org/ScintillaDoc.html#SCI_STYLESETFOR=
E</a>
<br>
<br> Neil
<br></blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;scintilla-interest" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
scintilla-interest/b5e91365-ea58-4a33-9027-7d1ca66d1db2n%40googlegroups.com=
?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/=
scintilla-interest/b5e91365-ea58-4a33-9027-7d1ca66d1db2n%40googlegroups.com=
</a>.<br />
------=_Part_194655_83210167.1765658692692--
------=_Part_194654_1208499370.1765658692692--