STC question

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:

http://wiki.woodpecker.org.cn/moin/NewEdit?action=AttachFile&do=view&target=t.gif

···

--
I like python!
My Blog: http://www.donews.net/limodou
My Django Site: http://www.djangocn.org
NewEdit Maillist: http://groups.google.com/group/NewEdit

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

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Thank you, I'll try it.

···

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

--
I like python!
My Blog: http://www.donews.net/limodou
My Django Site: http://www.djangocn.org
NewEdit Maillist: http://groups.google.com/group/NewEdit

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
>

Thank you, I'll try it.

--
I like python!
My Blog: http://www.donews.net/limodou
My Django Site: http://www.djangocn.org
NewEdit Maillist: http://groups.google.com/group/NewEdit

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.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Ok. I'll try.

···

On 4/16/06, Robin Dunn <robin@alldunn.com> wrote:

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.

--
I like python!
My Blog: http://www.donews.net/limodou
My Django Site: http://www.djangocn.org
NewEdit Maillist: http://groups.google.com/group/NewEdit