wxStyledTextCtrl and sql syntax highlightning

2006-06-21 Thread pierre_py
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

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxStyledTextCtrl and sql syntax highlightning

2006-06-21 Thread pierre_py
Hi.

Thanks it works now .. i must reset the default styles with
StyleClearAll and then set the styles apropriate again.

Is there a way that the keyword list isn't case sensitive, as sql
isn't.

reg,
Pierre

jean-michel bain-cornu wrote:
> > 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)
> Hi Pierre,
> I'd like to do some tests with your stuff, but I'd appreciate to have a
> working sample. Would you like to post it ?
> Regards,
> jm

-- 
http://mail.python.org/mailman/listinfo/python-list


Excel and TrackChanges

2006-02-14 Thread pierre_py
I have a problem with pycom automation with excel.
If i use the following in my excel_wrapper:
"""
self.Workbook.Save()
self.Workbook.HighlightChangesOptions(When=1)
self.Workbook.ListChangesOnNewSheet = True
"""
I don't get any history worksheet. If i use 2 (xlAllChanges) or 3
(xlNotYetReviewed), i get the history worksheet but with all results.

I use Office 2k sp1.

thanks in advance

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Excel and TrackChanges

2006-02-16 Thread pierre_py
If i move the Save after the HighlightChangesOptions it will popup a
message saying it can only be used when workbook is saved.

The problem is actually not only in python, i figured out that the
samples in msdn (which do the same) don't work in VBA also (if i give
my macros a shortcut).

I have now fixed-it with ApplyAllChanges(), which gives me thing i need
(i need the track changes just to create a log file of whats
happening).

thanks

-- 
http://mail.python.org/mailman/listinfo/python-list