Perhaps this could be achieved by folding the content you don't wish to display. More information can be located here: http://www.yellowbrain.com/stc/folding.html
wxPython StyledTextCtrl line numbers not starting at 1
-
11-12-2021 - |
Pregunta
I know how to add line numbers to a wxPython StyledTextCtrl, thanks to the wxPython Demos.
myctrl.SetMarginType(0, wx.stc.STC_MARGIN_NUMBER)
Is there a way to make the line numbering start at something other than 1?
The motivation for this is to show snippets of a large text file. I want the line numbers to match those in the complete file, but I don't want to load the entire file in my text control.
Solución 2
Otros consejos
I'd hide the default line number margin and use a custom one, see margins documentation for the details.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow