0

In process of attempting to build a CSS editor. I was wondering if anyone could lead me to a way to highlight CSS for a rich GUI control in wxPython specifically?

Also I would like to parse,serialize, validate and write CSS to file. I did find cssutils but was getting errors when parsing. They did not seem to be volitile errors but no sure if I should explore it futher of find something else... if there is something else.

Any Help would be greatly Appreciated -- Andrew

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by vegaseat
0

If richedit is your wx.TextCtrl object set to
style=wx.TE_MULTILINE|wx.TE_RICH2 then use

richedit.SetInsertionPoint(0)
richedit.SetStyle(start, end, wx.TextAttr("red", "yellow"))

where start/end is the index range in your string you want to highlight in the given fg/bg colors.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.