When I write some html code in NewEdit, which uses STC for its editor
control. And I'v set the lexer to wxSTC_LEX_HTML. But I found if I
input some java script code in it, and if there is no "src" attribute,
it will display a weaver line below every code line. And I don't know
how to remove this style. Is there anyone know it?
Thanks a lot.
If you don't understand what I mean, please visit the link:
When I write some html code in NewEdit, which uses STC for its editor
control. And I'v set the lexer to wxSTC_LEX_HTML. But I found if I
input some java script code in it, and if there is no "src" attribute,
it will display a weaver line below every code line. And I don't know
how to remove this style. Is there anyone know it?
It looks like it's using an indicator, so you can probably get rid of it by clearing the indicator styles. If that's not it then you might want to just get the style byte at a location that is showing the weaver line and see which bits are set, and then see which of the wxSTC_H* styles are set and then change the settings for that style.
limodou wrote:
> When I write some html code in NewEdit, which uses STC for its editor
> control. And I'v set the lexer to wxSTC_LEX_HTML. But I found if I
> input some java script code in it, and if there is no "src" attribute,
> it will display a weaver line below every code line. And I don't know
> how to remove this style. Is there anyone know it?
It looks like it's using an indicator, so you can probably get rid of it
by clearing the indicator styles. If that's not it then you might want
to just get the style byte at a location that is showing the weaver line
and see which bits are set, and then see which of the wxSTC_H* styles
are set and then change the settings for that style.
I'v found it. It seems that stc uses 5 bits for default style bits.
And after I calling SetStyleBits(6), everything is ok.
···
On 4/14/06, limodou <limodou@gmail.com> wrote:
On 4/14/06, Robin Dunn <robin@alldunn.com> wrote:
> limodou wrote:
> > When I write some html code in NewEdit, which uses STC for its editor
> > control. And I'v set the lexer to wxSTC_LEX_HTML. But I found if I
> > input some java script code in it, and if there is no "src" attribute,
> > it will display a weaver line below every code line. And I don't know
> > how to remove this style. Is there anyone know it?
>
> It looks like it's using an indicator, so you can probably get rid of it
> by clearing the indicator styles. If that's not it then you might want
> to just get the style byte at a location that is showing the weaver line
> and see which bits are set, and then see which of the wxSTC_H* styles
> are set and then change the settings for that style.
>
> See also:
> http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/contrib/src/stc/scintilla/src/LexHTML.cxx?rev=1.13&content-type=text/vnd.viewcvs-markup
>
When I write some html code in NewEdit, which uses STC for its editor
control. And I'v set the lexer to wxSTC_LEX_HTML. But I found if I
input some java script code in it, and if there is no "src" attribute,
it will display a weaver line below every code line. And I don't know
how to remove this style. Is there anyone know it?
It looks like it's using an indicator, so you can probably get rid of it
by clearing the indicator styles. If that's not it then you might want
to just get the style byte at a location that is showing the weaver line
and see which bits are set, and then see which of the wxSTC_H* styles
are set and then change the settings for that style.
limodou wrote:
> On 4/14/06, limodou <limodou@gmail.com> wrote:
>> On 4/14/06, Robin Dunn <robin@alldunn.com> wrote:
>>> limodou wrote:
>>>> When I write some html code in NewEdit, which uses STC for its editor
>>>> control. And I'v set the lexer to wxSTC_LEX_HTML. But I found if I
>>>> input some java script code in it, and if there is no "src" attribute,
>>>> it will display a weaver line below every code line. And I don't know
>>>> how to remove this style. Is there anyone know it?
>>> It looks like it's using an indicator, so you can probably get rid of it
>>> by clearing the indicator styles. If that's not it then you might want
>>> to just get the style byte at a location that is showing the weaver line
>>> and see which bits are set, and then see which of the wxSTC_H* styles
>>> are set and then change the settings for that style.
>>>
>>> See also:
>>> http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/contrib/src/stc/scintilla/src/LexHTML.cxx?rev=1.13&content-type=text/vnd.viewcvs-markup
>>>
>> Thank you, I'll try it.
>>
>
> I'v found it. It seems that stc uses 5 bits for default style bits.
> And after I calling SetStyleBits(6), everything is ok.
It looks like the HTML lexer uses 7 bits. Counting all the nested
scripting languages it supports there are 127 styles defined.