stc.SendMsg(SCI_WRAPCOUNT,line,0) always = 0

Josh Menke wrote:

I'm using wxPython and I need to correctly scroll to historical locations on a word wrapped page.

The problem is I get nothing out of:

extra_lines = self.SendMsg(SCI_WRAPCOUNT,line,0)

where self is a subclass of wx.stc.StyledTextCtrl

wxPython doesn't implement the function WrapCount that I think wxWidgets does.

from wxscintilla.cpp:

// The number of display lines needed to wrap a document line
int wxScintilla::WrapCount (int line) {
    return SendMsg (SCI_WRAPCOUNT, line, 0);
}

Does anyone have any ideas on the problem here? Is it wxPython's fault only? Anyone know why WrapCount isn't in wxPython? Is this a question for the devs instead?

wxScintilla is not wxStyledTextCtrl. It is a fork of my code and changed a number of things in incompatible ways. The one big advantage that it has right now is that it is wrapping a newer version of Scintilla, so that may be where the WrapCount function is coming from. I have it on my ToDo list ot update the Scintilla that wxStyleTextCtrl is using, but it won't make it into this coming release. It will be in the next one.

···

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