wxStyledTextCtrl

Hello all,

Can somebody help me with getting the linevalues in wxStyledTextCtrl?

I don't mean the line in the file depending on EOLs, but the
wordwrapped lines.
While my caret shows being in line 10 it can technically still be line
0, and I want the value 10 not 0.

The current viewable line can be calculated with GetCurrenttPos,
PointFromPosition and
Lineheight. The first line displayed will be line 0 whereever you are
in the document. So that one is solved.

The values I need are: the virtual line, what will be the same as the
viewable line if the widget is high enough. And I need the total lines
of the document (the wordwrapped pieces, not the technically lines)

Thanks it advance,
Marcel

Aaiii, that was a simple one. I’m sorry I asked you. Found out just after sending the message. :frowning:

Calculate with 0 for the first line and GetLength for the last.

Marcel

···

On Thu, Oct 14, 2010 at 11:27 AM, Marcel marcelspostbakje@gmail.com wrote:

Hello all,

Can somebody help me with getting the linevalues in wxStyledTextCtrl?

I don’t mean the line in the file depending on EOLs, but the

wordwrapped lines.

While my caret shows being in line 10 it can technically still be line

0, and I want the value 10 not 0.

The current viewable line can be calculated with GetCurrenttPos,

PointFromPosition and

Lineheight. The first line displayed will be line 0 whereever you are

in the document. So that one is solved.

The values I need are: the virtual line, what will be the same as the

viewable line if the widget is high enough. And I need the total lines

of the document (the wordwrapped pieces, not the technically lines)

Thanks it advance,

Marcel

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en