dear VIP prolog users,
I use scintilla control in several projects, it is an ideal way to edit settings.
When using Visual prolog syntax I cant seem to succeed in changing the color of The string,
I attach a screen shot here. current color is very difficult to read .
If anyone knows a solution would be very welcome.
- Thomas Linder Puls
- VIP Member
- Posts: 1327
- Joined: 28 Feb 2000 0:01
Re: sci lexer colors
It is clearly not the normal color.
How did you get that color?
Do you rely on the editor choosing lexer and colors based on file extension?
Are you using the sciLexer.dll that we provide? (The official versions contains an "old" Visual Prolog lexer).
How did you get that color?
Do you rely on the editor choosing lexer and colors based on file extension?
Are you using the sciLexer.dll that we provide? (The official versions contains an "old" Visual Prolog lexer).
Regards Thomas Linder Puls
PDC
PDC
Re: sci lexer colors
dear Thomas,
thankyou for your reply,
I didnt change any colors yet and the config was set through :
sciLexer_ctl:lexerDefault_visualProlog().
I use Visual-Prolog 9, maybe this contains an older scilexer.dll
i will investigate it further and will then post the extra info here.
thankyou for your reply,
I didnt change any colors yet and the config was set through :
sciLexer_ctl:lexerDefault_visualProlog().
I use Visual-Prolog 9, maybe this contains an older scilexer.dll
i will investigate it further and will then post the extra info here.
- Thomas Linder Puls
- VIP Member
- Posts: 1327
- Joined: 28 Feb 2000 0:01
Re: sci lexer colors
The Vip9 sciLexer fits the vip9 code, so that should not be a problem.
Calling ciLexer_ctl:lexerDefault_visualProlog() will result in three major things:
The lexer property on the control will be set to the visual prolog lexer, and the control will have styles updated (the third thing is setting keywords but that is not the issue here).
The two first things is dont by this code:
There is a little wrapping that makes sure that the code is delayed to when the control actually exists (i.e. is shown).
Your picture looks like something has called: styleSetBack(sce_visualProlog_string, <cyan style>),
I have never tried changing a style after the text has already been styled, but you could try to add a line like this:
That line will after a second change the mentioned style to <something> else.
Calling ciLexer_ctl:lexerDefault_visualProlog() will result in three major things:
The lexer property on the control will be set to the visual prolog lexer, and the control will have styles updated (the third thing is setting keywords but that is not the issue here).
The two first things is dont by this code:
Code: Select all
predicates
lexerDefault_visualProlog_style : ().
clauses
lexerDefault_visualProlog_style() :-
lexer := sclex_visualProlog,
styleSetFore(sce_visualProlog_default, default_styleFore),
styleSetFore(sce_visualProlog_key_major, key_major_styleFore),
styleSetFore(sce_visualProlog_key_minor, key_minor_styleFore),
styleSetFore(sce_visualProlog_key_directive, key_directive_styleFore),
styleSetFore(sce_visualProlog_identifier, identifier_styleFore),
styleSetFore(sce_visualProlog_variable, variable_styleFore),
styleSetFore(sce_visualProlog_anonymous, anonymous_styleFore),
styleSetFore(sce_visualProlog_number, number_styleFore),
styleSetFore(sce_visualProlog_operator, operator_styleFore),
% comment styles
styleSetFore(sce_visualprolog_comment_block, comment_block_styleFore),
styleSetFore(sce_visualProlog_comment_line, comment_line_styleFore),
styleSetFore(sce_visualProlog_comment_key, comment_key_styleFore),
styleSetFore(sce_visualProlog_comment_key_error, comment_key_error_styleFore),
% string styles
styleSetFore(sce_visualProlog_string, string_styleFore),
styleSetFore(sce_visualProlog_string_escape, string_escape_styleFore),
% verbatim string styles
styleSetFore(sce_visualProlog_string_verbatim, string_verbatim_styleFore),
styleSetFore(sce_visualProlog_string_verbatim_special, string_verbatim_special_styleFore),
styleSetBack(sce_visualProlog_string_verbatim_eol, string_verbatim_eol_styleBack),
% character & string error styles
styleSetFore(sce_visualProlog_string_eol_open, string_eol_open_styleFore),
styleSetBack(sce_visualProlog_string_eol_open, string_eol_open_styleBack),
styleSetFore(sce_visualProlog_string_escape_error, string_escape_error_styleFore),
styleSetBack(sce_visualProlog_string_escape_error, string_escape_error_styleBack),
% embeddes syntax and placeholders
styleSetFore(sce_visualprolog_embedded, embedded_styleFore),
styleSetFore(sce_visualprolog_placeholder, placeholder_styleFore).
Your picture looks like something has called: styleSetBack(sce_visualProlog_string, <cyan style>),
I have never tried changing a style after the text has already been styled, but you could try to add a line like this:
Code: Select all
delayCall(1000, { :- sciLexer_ctl:styleSetBack(sce_visualProlog_string, <somehing>) },
Regards Thomas Linder Puls
PDC
PDC
Re: sci lexer colors
I have tried this code below, and it works very good.
sciLexer_ctl:styleSetFore(16, 0x910000),
sciLexer_ctl:styleSetBack(16, 0xC4FFFF).
sciLexer_ctl:styleSetFore(sce_visualProlog_string, 0x910000),
sciLexer_ctl:styleSetBack(sce_visualProlog_string, 0xC4FFFF).
thankyou.
sciLexer_ctl:styleSetFore(16, 0x910000),
sciLexer_ctl:styleSetBack(16, 0xC4FFFF).
sciLexer_ctl:styleSetFore(sce_visualProlog_string, 0x910000),
sciLexer_ctl:styleSetBack(sce_visualProlog_string, 0xC4FFFF).
thankyou.
- Thomas Linder Puls
- VIP Member
- Posts: 1327
- Joined: 28 Feb 2000 0:01
Re: sci lexer colors
I think it is very strange that you have to do this.
Do you have the same problem if you build the editor demo and load a .pro file into that program?
Do you have the same problem if you build the editor demo and load a .pro file into that program?
Regards Thomas Linder Puls
PDC
PDC