Re: Cannot load a lexer
Roger Tunnicliffe <[email protected]> Sat, 13 Dec 2025 17:50:35 -0800 (PST)
| Newsgroups | gmane.comp.lib.scintilla.devel |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_127028_1823841031.1765677035410
Content-Type: multipart/alternative;
boundary="----=_Part_127029_44996159.1765677035410"
------=_Part_127029_44996159.1765677035410
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Further to the above Neil..
You have led me to an epiphany.. So I have the following which works
CONST SCI_SETILEXER As UInteger =3D 4033
CONST SCE_B_COMMENT =3D 1
CONST SCE_B_NUMBER =3D 2=20
CONST SCE_B_KEYWORD =3D 3
CONST SCE_B_STRING =3D 4
CONST SCE_B_PREPROCESSOR =3D 5
CONST SCE_B_OPERATOR =3D 6
CONST SCE_B_IDENTIFIER =3D 7
CONST SCE_B_DATE =3D 8
CONST SCE_B_STRINGEOL =3D 9
CONST SCE_B_KEYWORD2 =3D 10
CONST SCE_B_KEYWORD3 =3D 11
CONST SCE_B_KEYWORD4 =3D 12
CONST SCE_B_CONSTANT =3D 13
CONST SCE_B_ASM =3D 14
CONST SCE_B_LABEL =3D 15
CONST SCE_B_ERROR =3D 16
CONST SCE_B_HEXNUMBER =3D 17
CONST SCE_B_BINNUMBER =3D 18
CONST SCE_B_COMMENTBLOCK =3D 19
CONST SCE_B_DOCLINE =3D 20
CONST SCE_B_DOCBLOCK =3D 21
CONST SCE_B_DOCKEYWORD =3D 22
Dim pLexer As Any Ptr =3D CreateLexer("freebasic")
scintilla_send_message(sci, SCI_SETILEXER, 0, pLexer)
scintilla_send_message(sci, SCI_STYLESETFORE, SCE_B_COMMENT, mRGB(90,90,90)=
)
scintilla_send_message(sci, SCI_STYLESETFORE, SCE_B_NUMBER, mRGB(255,255,0)=
)=20
scintilla_send_message(sci, SCI_STYLESETFORE, SCE_B_STRING, mRGB(224,176,25=
5
))
scintilla_send_message(sci, SCI_STYLESETFORE, SCE_B_OPERATOR, mRGB(255,255,
255))
and this that doesn't
scintilla_send_message(sci, SCI_STYLESETFORE, SCE_B_CONSTANT, mRGB(0,255,25=
5))=20
scintilla_send_message(sci, SCI_STYLESETFORE, SCE_B_ASM, mRGB(0,255,255))=
=20
scintilla_send_message(sci, SCI_STYLESETFORE, SCE_B_LABEL, mRGB(0,255,255))
dim one_keyword as string =3D "dim" & &h00
scintilla_send_message(sci, SCI_SETKEYWORDS, 1, strptr(one_keyword))
scintilla_send_message(sci, SCI_STYLESETFORE, SCE_B_KEYWORD, mRGB(0,255,255
))
from the doc it says.
*SCI_SETKEYWORDS(int keyWordSet, const char *keyWords)*
You can set up to 9 lists of keywords for use by the current lexer.=20
keyWordSet can be 0 to 8 (actually 0 to KEYWORDSET_MAX) and selects which=
=20
keyword list to replace
If this is to replace keywords it tells us that they already exist so I am=
=20
not sure why I would have to add any..
Regardless..
I have the constants from SciLexer.h and am selecting keywords set 1=20
because LexBasic.cxx says:-
static const char * const freebasicWordListDesc[] =3D {
"FreeBasic Keywords",
"FreeBasic PreProcessor Keywords",
"user defined 1",
"user defined 2",
0
};
I have tried other keyword lists (0,2,3, etc) but to no avail.
Can you spot what I am doing wrong ???
Cheers
Roger
On Sunday, December 14, 2025 at 7:44:52=E2=80=AFAM UTC+11 Roger Tunnicliffe=
wrote:
> 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,4=
3))=20
> ' Background Dark
> scintilla_send_message(sci, SCI_STYLESETFORE, STYLE_DEFAULT, mRGB(0,255,
> 255)) ' Foreground Cyan
> scintilla_send_message(sci, SCI_STYLESETFONT, STYLE_DEFAULT, strptr(
> "Consolas")) ' Font style
> scintilla_send_message(sci, SCI_STYLESETSIZE, STYLE_DEFAULT, 9) ' Font=20
> size
> scintilla_send_message(sci, SCI_SETTABWIDTH, STYLE_DEFAULT, 2) ' Tab widt=
h
> 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,5=
6
> ,56))
>
> On Saturday, December 13, 2025 at 6:23:09=E2=80=AFPM UTC+11 Neil wrote:
>
>> Roger Tunnicliffe:=20
>>
>> > Dim pLexer As Any Ptr =3D CreateLexer("freebasic")=20
>> ...=20
>> > dim R as integer =3D scintilla_send_message(sci, SCI_GETLEXER, NULL,=
=20
>> pLexer)=20
>> >=20
>> > returns a value of 75=20
>>
>> That looks good since that is the right ID for freebasic.=20
>> #define SCLEX_FREEBASIC 75=20
>>
>> > Correcting SCI_SETILEXER did not provide any Highlighting in Scintilla=
=20
>> at all.=20
>>
>> Have you defined appearances for the lexical classes?=20
>> SCI_STYLESETFORE and related.=20
>> https://scintilla.org/ScintillaDoc.html#SCI_STYLESETFORE=20
>>
>> Neil=20
>>
>
--=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/bad807f9-df66-42e0-8ea2-27ebb76fc04an%40googlegroups.com.
------=_Part_127029_44996159.1765677035410
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Further to the above Neil..<div>You have led me to an epiphany.. So I have =
the following which works</div><div><br /></div><div><div style=3D"color: r=
gb(204, 204, 204); background-color: rgb(31, 31, 31); font-family: "Dr=
oid Sans Mono", "monospace", monospace; font-size: 13px; lin=
e-height: 18px; white-space: pre;"><div> <span style=3D"color: rgb(86,=
156, 214);">CONST </span>SCI_SETILEXER <span style=3D"color: rgb(212, 212,=
212);">As</span> <span style=3D"color: rgb(78, 201, 176);">UInteger</span>=
<span style=3D"color: rgb(212, 212, 212);">=3D</span> <span style=3D"color=
: rgb(181, 206, 168);">4033</span></div><br /><div> <span style=3D"col=
or: rgb(86, 156, 214);">CONST </span><span style=3D"color: rgb(156, 220, 25=
4);">SCE_B_COMMENT</span> <span style=3D"color: rgb(212, 212, 212);">=3D</s=
pan> <span style=3D"color: rgb(181, 206, 168);">1</span></div><div> <s=
pan style=3D"color: rgb(86, 156, 214);">CONST </span><span style=3D"color: =
rgb(156, 220, 254);">SCE_B_NUMBER</span> <span style=3D"color: rgb(212, 212=
, 212);">=3D</span> <span style=3D"color: rgb(181, 206, 168);">2</span> =
</div><div> <span style=3D"color: rgb(86, 156, 214);">CONST </span><=
span style=3D"color: rgb(156, 220, 254);">SCE_B_KEYWORD</span> <span style=
=3D"color: rgb(212, 212, 212);">=3D</span> <span style=3D"color: rgb(181, 2=
06, 168);">3</span></div><div> <span style=3D"color: rgb(86, 156, 214)=
;">CONST </span><span style=3D"color: rgb(156, 220, 254);">SCE_B_STRING</sp=
an> <span style=3D"color: rgb(212, 212, 212);">=3D</span> <span style=3D"co=
lor: rgb(181, 206, 168);">4</span></div><div> <span style=3D"color: rg=
b(86, 156, 214);">CONST </span><span style=3D"color: rgb(156, 220, 254);">S=
CE_B_PREPROCESSOR</span> <span style=3D"color: rgb(212, 212, 212);">=3D</sp=
an> <span style=3D"color: rgb(181, 206, 168);">5</span></div><div> <sp=
an style=3D"color: rgb(86, 156, 214);">CONST </span><span style=3D"color: r=
gb(156, 220, 254);">SCE_B_OPERATOR</span> <span style=3D"color: rgb(212, 21=
2, 212);">=3D</span> <span style=3D"color: rgb(181, 206, 168);">6</span></d=
iv><div> <span style=3D"color: rgb(86, 156, 214);">CONST </span><span =
style=3D"color: rgb(156, 220, 254);">SCE_B_IDENTIFIER</span> <span style=3D=
"color: rgb(212, 212, 212);">=3D</span><span style=3D"color: rgb(156, 220, =
254);"> 7</span></div><div> <span style=3D"color: rgb(86, 156, 214);">=
CONST </span><span style=3D"color: rgb(156, 220, 254);">SCE_B_DATE</span> <=
span style=3D"color: rgb(212, 212, 212);">=3D</span> <span style=3D"color: =
rgb(181, 206, 168);">8</span></div><div> <span style=3D"color: rgb(86,=
156, 214);">CONST </span><span style=3D"color: rgb(156, 220, 254);">SCE_B_=
STRINGEOL</span> <span style=3D"color: rgb(212, 212, 212);">=3D</span> <spa=
n style=3D"color: rgb(181, 206, 168);">9</span></div><div> <span style=
=3D"color: rgb(86, 156, 214);">CONST </span><span style=3D"color: rgb(156, =
220, 254);">SCE_B_KEYWORD2</span> <span style=3D"color: rgb(212, 212, 212);=
">=3D</span> <span style=3D"color: rgb(181, 206, 168);">10</span></div><div=
> <span style=3D"color: rgb(86, 156, 214);">CONST </span><span style=
=3D"color: rgb(156, 220, 254);">SCE_B_KEYWORD3</span> <span style=3D"color:=
rgb(212, 212, 212);">=3D</span> <span style=3D"color: rgb(181, 206, 168);"=
>11</span></div><div> <span style=3D"color: rgb(86, 156, 214);">CONST =
</span><span style=3D"color: rgb(156, 220, 254);">SCE_B_KEYWORD4</span> <sp=
an style=3D"color: rgb(212, 212, 212);">=3D</span> <span style=3D"color: rg=
b(181, 206, 168);">12</span></div><div> <span style=3D"color: rgb(86, =
156, 214);">CONST </span><span style=3D"color: rgb(156, 220, 254);">SCE_B_C=
ONSTANT</span> <span style=3D"color: rgb(212, 212, 212);">=3D</span> <span =
style=3D"color: rgb(181, 206, 168);">13</span></div><div> <span style=
=3D"color: rgb(86, 156, 214);">CONST </span><span style=3D"color: rgb(156, =
220, 254);">SCE_B_ASM</span> <span style=3D"color: rgb(212, 212, 212);">=3D=
</span> <span style=3D"color: rgb(181, 206, 168);">14</span></div><div> =
<span style=3D"color: rgb(86, 156, 214);">CONST </span><span style=3D"col=
or: rgb(156, 220, 254);">SCE_B_LABEL</span> <span style=3D"color: rgb(212, =
212, 212);">=3D</span> <span style=3D"color: rgb(181, 206, 168);">15</span>=
</div><div> <span style=3D"color: rgb(86, 156, 214);">CONST </span><sp=
an style=3D"color: rgb(156, 220, 254);">SCE_B_ERROR</span> <span style=3D"c=
olor: rgb(212, 212, 212);">=3D</span> <span style=3D"color: rgb(181, 206, 1=
68);">16</span></div><div> <span style=3D"color: rgb(86, 156, 214);">C=
ONST </span><span style=3D"color: rgb(156, 220, 254);">SCE_B_HEXNUMBER</spa=
n> <span style=3D"color: rgb(212, 212, 212);">=3D</span> <span style=3D"col=
or: rgb(181, 206, 168);">17</span></div><div> <span style=3D"color: rg=
b(86, 156, 214);">CONST </span><span style=3D"color: rgb(156, 220, 254);">S=
CE_B_BINNUMBER</span> <span style=3D"color: rgb(212, 212, 212);">=3D</span>=
<span style=3D"color: rgb(181, 206, 168);">18</span></div><div> <span=
style=3D"color: rgb(86, 156, 214);">CONST </span><span style=3D"color: rgb=
(156, 220, 254);">SCE_B_COMMENTBLOCK</span> <span style=3D"color: rgb(212, =
212, 212);">=3D</span> <span style=3D"color: rgb(181, 206, 168);">19</span>=
</div><div> <span style=3D"color: rgb(86, 156, 214);">CONST </span><sp=
an style=3D"color: rgb(156, 220, 254);">SCE_B_DOCLINE</span> <span style=3D=
"color: rgb(212, 212, 212);">=3D</span> <span style=3D"color: rgb(181, 206,=
168);">20</span></div><div> <span style=3D"color: rgb(86, 156, 214);"=
>CONST </span><span style=3D"color: rgb(156, 220, 254);">SCE_B_DOCBLOCK</sp=
an> <span style=3D"color: rgb(212, 212, 212);">=3D</span> <span style=3D"co=
lor: rgb(181, 206, 168);">21</span></div><div> <span style=3D"color: r=
gb(86, 156, 214);">CONST </span><span style=3D"color: rgb(156, 220, 254);">=
SCE_B_DOCKEYWORD</span> <span style=3D"color: rgb(212, 212, 212);">=3D</spa=
n> <span style=3D"color: rgb(181, 206, 168);">22</span></div><br /><div> =
<span style=3D"color: rgb(86, 156, 214);">Dim</span><span style=3D"color=
: rgb(156, 220, 254);"> pLexer </span><span style=3D"color: rgb(212, 212, 2=
12);">As</span> <span style=3D"color: rgb(78, 201, 176);">Any</span> <span =
style=3D"color: rgb(156, 220, 254);">Ptr</span> <span style=3D"color: rgb(2=
12, 212, 212);">=3D</span> <span style=3D"color: rgb(220, 220, 170);">Creat=
eLexer</span>(<span style=3D"color: rgb(206, 145, 120);">"freebasic"</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_SETILEXER</span>, <span style=3D=
"color: rgb(181, 206, 168);">0</span>,<span style=3D"color: rgb(156, 220, 2=
54);"> pLexer</span>)</div><br /><div> <span style=3D"color: rgb(220, =
220, 170);">scintilla_send_message</span>(<span style=3D"color: rgb(156, 22=
0, 254);">sci</span>,<span style=3D"color: rgb(156, 220, 254);"> SCI_STYLES=
ETFORE</span>,<span style=3D"color: rgb(156, 220, 254);"> SCE_B_COMMENT</sp=
an>, <span style=3D"color: rgb(220, 220, 170);">mRGB</span>(<span style=3D"=
color: rgb(181, 206, 168);">90</span>,<span style=3D"color: rgb(181, 206, 1=
68);">90</span>,<span style=3D"color: rgb(181, 206, 168);">90</span>))</div=
><div> <span style=3D"color: rgb(220, 220, 170);">scintilla_send_messa=
ge</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"col=
or: rgb(156, 220, 254);"> SCE_B_NUMBER</span>, <span style=3D"color: rgb(22=
0, 220, 170);">mRGB</span>(<span style=3D"color: rgb(181, 206, 168);">255</=
span>,<span style=3D"color: rgb(181, 206, 168);">255</span>,<span style=3D"=
color: rgb(181, 206, 168);">0</span>)) </div><div> <span style=3D=
"color: rgb(220, 220, 170);">scintilla_send_message</span>(<span style=3D"c=
olor: rgb(156, 220, 254);">sci</span>,<span style=3D"color: rgb(156, 220, 2=
54);"> SCI_STYLESETFORE</span>,<span style=3D"color: rgb(156, 220, 254);"> =
SCE_B_STRING</span>, <span style=3D"color: rgb(220, 220, 170);">mRGB</span>=
(<span style=3D"color: rgb(181, 206, 168);">224</span>,<span style=3D"color=
: rgb(181, 206, 168);">176</span>,<span style=3D"color: rgb(181, 206, 168);=
">255</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_STYLESETFORE</span>=
,<span style=3D"color: rgb(156, 220, 254);"> SCE_B_OPERATOR</span>, <span s=
tyle=3D"color: rgb(220, 220, 170);">mRGB</span>(<span style=3D"color: rgb(1=
81, 206, 168);">255</span>,<span style=3D"color: rgb(181, 206, 168);">255</=
span>,<span style=3D"color: rgb(181, 206, 168);">255</span>))</div><br /></=
div></div><div>and this that doesn't</div><div><div style=3D"color: rgb(204=
, 204, 204); background-color: rgb(31, 31, 31); font-family: "Droid Sa=
ns Mono", "monospace", monospace; font-size: 13px; line-heig=
ht: 18px; white-space: pre;"><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_STYLESETFO=
RE</span>,<span style=3D"color: rgb(156, 220, 254);"> SCE_B_CONSTANT</span>=
, <span style=3D"color: rgb(220, 220, 170);">mRGB</span>(<span style=3D"col=
or: 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>)) <=
/div><div> <span style=3D"color: rgb(220, 220, 170);">scintilla_send_m=
essage</span>(<span style=3D"color: rgb(156, 220, 254);">sci</span>,<span s=
tyle=3D"color: rgb(156, 220, 254);"> SCI_STYLESETFORE</span>,<span style=3D=
"color: rgb(156, 220, 254);"> SCE_B_ASM</span>, <span style=3D"color: rgb(2=
20, 220, 170);">mRGB</span>(<span style=3D"color: rgb(181, 206, 168);">0</s=
pan>,<span style=3D"color: rgb(181, 206, 168);">255</span>,<span style=3D"c=
olor: rgb(181, 206, 168);">255</span>)) </div><div> <span style=3D=
"color: rgb(220, 220, 170);">scintilla_send_message</span>(<span style=3D"c=
olor: rgb(156, 220, 254);">sci</span>,<span style=3D"color: rgb(156, 220, 2=
54);"> SCI_STYLESETFORE</span>,<span style=3D"color: rgb(156, 220, 254);"> =
SCE_B_LABEL</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: r=
gb(181, 206, 168);">255</span>,<span style=3D"color: rgb(181, 206, 168);">2=
55</span>))</div><div> </div><div> <span style=3D"color: rgb(86, =
156, 214);">dim</span><span style=3D"color: rgb(156, 220, 254);"> one_keywo=
rd </span><span style=3D"color: rgb(212, 212, 212);">as</span> <span style=
=3D"color: rgb(78, 201, 176);">string</span> <span style=3D"color: rgb(212,=
212, 212);">=3D</span> <span style=3D"color: rgb(206, 145, 120);">"dim"</s=
pan> <span style=3D"color: rgb(212, 212, 212);">&</span> <span style=3D=
"color: rgb(212, 212, 212);">&</span><span style=3D"color: rgb(156, 220=
, 254);">h00</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_SETKEYWORDS</s=
pan>, <span style=3D"color: rgb(181, 206, 168);">1</span>, <span style=3D"c=
olor: rgb(220, 220, 170);">strptr</span>(<span style=3D"color: rgb(156, 220=
, 254);">one_keyword</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_STYL=
ESETFORE</span>,<span style=3D"color: rgb(156, 220, 254);"> SCE_B_KEYWORD</=
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>))=
</div><br /></div></div><div><br /></div><div>from the doc it says.</div><d=
iv><b style=3D"color: rgb(0, 0, 0); font-family: "Times New Roman"=
;; font-size: medium;">SCI_SETKEYWORDS(int keyWordSet, const char *keyWords=
)</b></div><div><span style=3D"color: rgb(0, 0, 0); font-family: "Time=
s New Roman"; font-size: medium;">You can set up to 9 lists of keyword=
s for use by the current lexer.=C2=A0</span><span style=3D"font-weight: bol=
d; font-family: Menlo, Consolas, "Bitstream Vera Sans Mono", &quo=
t;Courier New", monospace; font-style: italic; color: rgb(0, 0, 0); fo=
nt-size: medium;">keyWordSet</span><span style=3D"color: rgb(0, 0, 0); font=
-family: "Times New Roman"; font-size: medium;">=C2=A0can be 0 to=
8 (actually 0 to=C2=A0</span><span style=3D"font-weight: bold; font-family=
: Menlo, Consolas, "Bitstream Vera Sans Mono", "Courier New&=
quot;, monospace; color: rgb(0, 0, 0); font-size: medium;">KEYWORDSET_MAX</=
span><span style=3D"color: rgb(0, 0, 0); font-family: "Times New Roman=
"; font-size: medium;">) and selects which keyword list to replace</sp=
an></div><div><font color=3D"#000000" face=3D"Times New Roman" size=3D"3"><=
br /></font></div><div><font color=3D"#000000" face=3D"Times New Roman" siz=
e=3D"3">If this is to replace keywords it tells us that they already exist =
so I am not sure why I would have to add any..</font></div><div><font color=
=3D"#000000" face=3D"Times New Roman" size=3D"3">Regardless..</font></div><=
div><font color=3D"#000000" face=3D"Times New Roman" size=3D"3">I have the =
constants from SciLexer.h and am selecting keywords set 1 because LexBasic.=
cxx says:-</font></div><div><font color=3D"#000000" face=3D"Times New Roman=
" size=3D"3"><br /></font></div><div>static const char * const freebasicWor=
dListDesc[] =3D {<br /><span style=3D"white-space: pre;"> </span>"FreeBasic=
Keywords",<br /><span style=3D"white-space: pre;"> </span>"FreeBasic PrePr=
ocessor Keywords",<br /><span style=3D"white-space: pre;"> </span>"user def=
ined 1",<br /><span style=3D"white-space: pre;"> </span>"user defined 2",<b=
r /><span style=3D"white-space: pre;"> </span>0<br />};<font color=3D"#0000=
00" face=3D"Times New Roman" size=3D"3"><br /></font><br /></div><div>I hav=
e tried other keyword lists (0,2,3, etc) but to no avail.</div><div>Can you=
spot what I am doing wrong ???</div><div><br /></div><div>Cheers</div><div=
>Roger</div><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_att=
r">On Sunday, December 14, 2025 at 7:44:52=E2=80=AFAM UTC+11 Roger Tunnicli=
ffe wrote:<br/></div><blockquote class=3D"gmail_quote" style=3D"margin: 0 0=
0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Ye=
s 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",monospace;f=
ont-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,220,170)">scintilla_new</span>()</d=
iv><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"co=
lor:rgb(156,220,254)"> SCI_STYLESETBACK</span>,<span style=3D"color:rgb(156=
,220,254)"> STYLE_DEFAULT</span>, <span style=3D"color:rgb(220,220,170)">mR=
GB</span>(<span style=3D"color:rgb(181,206,168)">33</span>,<span style=3D"c=
olor:rgb(181,206,168)">37</span>,<span style=3D"color:rgb(181,206,168)">43<=
/span>)) <span style=3D"color:rgb(106,153,85)">' Backgr=
ound Dark</span></div><div> <span style=3D"color:rgb(220,220,170)">sci=
ntilla_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 sty=
le=3D"color:rgb(156,220,254)"> STYLE_DEFAULT</span>, <span style=3D"color:r=
gb(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:rg=
b(181,206,168)">255</span>)) <span style=3D"color:rgb(106,15=
3,85)">' Foreground Cyan</span></div><div> <span style=3D"color:rg=
b(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_STYLESETFO=
NT</span>,<span style=3D"color:rgb(156,220,254)"> STYLE_DEFAULT</span>, <sp=
an style=3D"color:rgb(220,220,170)">strptr</span>(<span style=3D"color:rgb(=
206,145,120)">"Consolas"</span>)) <span style=3D"colo=
r:rgb(106,153,85)">' Font style</span></div><div> <span style=3D"c=
olor:rgb(220,220,170)">scintilla_send_message</span>(<span style=3D"color:r=
gb(156,220,254)">sci</span>,<span style=3D"color:rgb(156,220,254)"> SCI_STY=
LESETSIZE</span>,<span style=3D"color:rgb(156,220,254)"> STYLE_DEFAULT</spa=
n>, <span style=3D"color:rgb(181,206,168)">9</span>) =
<span style=3D"color:rgb(106,153,85)">' Font size</span></div><d=
iv> <span style=3D"color:rgb(220,220,170)">scintilla_send_message</spa=
n>(<span style=3D"color:rgb(156,220,254)">sci</span>,<span style=3D"color:r=
gb(156,220,254)"> SCI_SETTABWIDTH</span>,<span style=3D"color:rgb(156,220,2=
54)"> STYLE_DEFAULT</span>, <span style=3D"color:rgb(181,206,168)">2</span>=
) <span style=3D"color:rgb(106,153,85)">'=
Tab width</span></div><div> <span style=3D"color:rgb(220,220,170)">sc=
intilla_send_message</span>(<span style=3D"color:rgb(156,220,254)">sci</spa=
n>,<span style=3D"color:rgb(156,220,254)"> SCI_SETSELBACK</span>,<span styl=
e=3D"color:rgb(156,220,254)"> STYLE_DEFAULT</span>, <span style=3D"color:rg=
b(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,1=
53,85)">' Selected Text BGR color BLUISH</span></div><div> <span s=
tyle=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_SETSELFORE</span>,<span style=3D"color:rgb(156,220,254)"> STYLE_DEF=
AULT</span>, <span style=3D"color:rgb(212,212,212)">&</span><span style=
=3D"color:rgb(156,220,254)">hffffff</span>) <span s=
tyle=3D"color:rgb(106,153,85)">' Selected Text FOR color WHITE</span></=
div><div> <span style=3D"color:rgb(220,220,170)">scintilla_send_messag=
e</span>(<span style=3D"color:rgb(156,220,254)">sci</span>,<span style=3D"c=
olor:rgb(156,220,254)"> SCI_SETCARETFORE</span>,<span style=3D"color:rgb(22=
0,220,170)">mRGB</span>(<span style=3D"color:rgb(181,206,168)">255</span>,<=
span style=3D"color:rgb(181,206,168)">255</span>,<span style=3D"color:rgb(1=
81,206,168)">255</span>),<span style=3D"color:rgb(181,206,168)">0</span>) =
<span style=3D"color:rgb(106,153,85)">' Caret=
Colour</span></div><div> <span style=3D"color:rgb(106,153,85)">' Pr=
opergate thru all styles</span></div><div> <span style=3D"color:rgb(22=
0,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_STYLECLEARALL<=
/span>, <span style=3D"color:rgb(181,206,168)">0</span>, <span style=3D"col=
or:rgb(181,206,168)">0</span>)</div><br><div> <span style=3D"color:rgb(1=
06,153,85)">' line-number text + background style</span></div><div> =
<span 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_SETMARGINTYPEN</span>, <span style=3D"color:rgb(181,206,168)=
">1</span>,<span style=3D"color:rgb(156,220,254)"> SC_MARGIN_NUMBER</span>)=
</div><div> <span style=3D"color:rgb(220,220,170)">scintilla_send_mess=
age</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:=
rgb(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)">scintilla_send_me=
ssage</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:r=
gb(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 s=
tyle=3D"color:rgb(181,206,168)">133</span>,<span style=3D"color:rgb(181,206=
,168)">229</span>))</div><div> <span style=3D"color:rgb(220,220,170)">=
scintilla_send_message</span>(<span style=3D"color:rgb(156,220,254)">sci</s=
pan>,<span style=3D"color:rgb(156,220,254)"> SCI_STYLESETBACK</span>,<span =
style=3D"color:rgb(156,220,254)"> STYLE_LINENUMBER</span>, <span style=3D"c=
olor:rgb(220,220,170)">mRGB</span>(<span style=3D"color:rgb(181,206,168)">5=
6</span>,<span style=3D"color:rgb(181,206,168)">56</span>,<span style=3D"co=
lor:rgb(181,206,168)">56</span>))</div><div></div></div><br></div><div clas=
s=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">On Saturday, Decem=
ber 13, 2025 at 6:23:09=E2=80=AFPM UTC+11 Neil wrote:<br></div><blockquote =
class=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" re=
l=3D"nofollow" target=3D"_blank" data-saferedirecturl=3D"https://www.google=
.com/url?hl=3Den&q=3Dhttps://scintilla.org/ScintillaDoc.html%23SCI_STYL=
ESETFORE&source=3Dgmail&ust=3D1765762941392000&usg=3DAOvVaw2EWx=
695ea0C_2_2ugwuyhb">https://scintilla.org/ScintillaDoc.html#SCI_STYLESETFOR=
E</a>
<br>
<br> Neil
<br></blockquote></div></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/bad807f9-df66-42e0-8ea2-27ebb76fc04an%40googlegroups.com=
?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/=
scintilla-interest/bad807f9-df66-42e0-8ea2-27ebb76fc04an%40googlegroups.com=
</a>.<br />
------=_Part_127029_44996159.1765677035410--
------=_Part_127028_1823841031.1765677035410--