wxStyledTextCtrl and sql syntax highlightning

pierre_py pslana at gmail.com
Wed Jun 21 09:52:05 CEST 2006


Hi.
I use wxPy version 2.4.2 for Python 2.3.

Now I wanted to use the wxStyledTextCtrl for viewing (editing) of sql
code.

I have the following:
        self.__m_styled_text_ctrl = wxPython.stc.wxStyledTextCtrl(
                        self, wx.NewId(),
style=wxPython.wx.wxNO_FULL_REPAINT_ON_RESIZE)
        self.__m_styled_text_ctrl.SetLexer(wxPython.stc.wxSTC_LEX_SQL)
        self.__m_styled_text_ctrl.SetProperty("fold", "1")
        self.__m_styled_text_ctrl.SetMargins(0,0)
        self.__m_styled_text_ctrl.SetKeyWords(0, SQL_KEYWORDS)

Where sql_keywords is string with space separated sql keywords.

When i add text to the ctrl i don't get the right highlightning.

What do i do wrong and what else do i have to specify?

thx in advance




More information about the Python-list mailing list