wxSTC: getting an auto-indent for python code

I've been scraping the wxSTC docs and I can't seem to find a
built-in way to automatically indent the next line of Python
code to the indent level of the previous line.

IOW, when I press <Enter> I want to end up at the current
indentation level, not at position 0 on the new line.

I can see pretty simple ways to do this myself, but don't want
to if there is already a built-in way. Anyone?

···

--
Paul McNett
Independent Software Consultant
http://www.paulmcnett.com

Paul McNett wrote:

I've been scraping the wxSTC docs and I can't seem to find a built-in way to automatically indent the next line of Python code to the indent level of the previous line.

IOW, when I press <Enter> I want to end up at the current indentation level, not at position 0 on the new line.

I can see pretty simple ways to do this myself, but don't want to if there is already a built-in way. Anyone?

I don't think there is a built-in mode for that, but you could probably get away with calling the Tab() method after you see the <Enter> event.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!