문제

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.

도움이 되었습니까?

해결책 2

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

다른 팁

I'd hide the default line number margin and use a custom one, see margins documentation for the details.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top