wxStyledTextCtrl problem ?

Jean Brouwers mrjean1ATcomcastDOTnet at no.spam.net
Mon Nov 29 03:10:18 EST 2004



If you are running GTK+ try using

        self.Editor.SetSTCFocus(True)

in addition to or instead of SetFocus().  Plus maybe

        wx.CallAfter(self.Editor.EnsureCaretVisible)

It solved the 'dissapearing caret' problem for our application.


/Jean Brouwers



In article
<pan.2004.11.28.12.10.30.74527 at autismuk.muralichucks.freeserve.co.uk>,
Paul Robson <autismuk at autismuk.muralichucks.freeserve.co.uk> wrote:

> I have a wierd thing with a little editor app I'm writing.
> 
> I'm using wxStyledTextCtrl ; the wrapper for Scintilla. When I create the
> frame in wxPython, I use self.Editor.SetFocus() to put the focus initially
> on the editor.
> 
> This works fine.
> 
> Odd thing is though, switching back and forwards between applications
> alternately hides and reappears the caret.
> 
> Hit Alt-Tab twice and it disappears
> Hit Alt-Tab twice and it comes back.
> 
> It still works fine - there's just no caret. I've tried various things in
> EVT_ACTIVATE including Moving the Caret on screen, and forcing it to be
> visible - they are being called but it makes no difference.
> 
> Any ideas ?
>



More information about the Python-list mailing list