how to set focus (to an editor) ?

Stef Mientki s.mientki at ru.nl
Sat Jun 2 04:13:03 PDT 2007


hello,

I'm using a Scintilla editor to show the active code in a simulation.
Now I'm not familiar with Scintilla at all,
and as for the moment I use just a few options of Scintilla,
and the manual is so huge  ...
... I can't find a method to keep focus on the editor.

So in general is there a command to set focus to a visual component ?

And specific for Scintilla,
I use these settings
   Code_Editor.SetCaretLineBack("BLUE")
   Code_Editor.SetCaretLineVisible(True)
   Code_Editor.GotoLine(Active_LineNumber)
and as long as the editor (and application) has focus, the active line 
is nicely highlighted.
 From Delphi I'm used, that most components can keep the active 
highligting, even when object / application looses focus,
by setting a special flag of that component.
But I can't find such a flag within Scintilla.
I've tried
      STCFocus(True)
      GetSTCFocus()
but both of them crashes.
Anyone has a good idea ?

cheers,
Stef Mientki






More information about the wxpython-users mailing list