I have a wxStyledTextCtrl
and I want to find the column number of a given position in the document. Basically I want a function like GetColumn
but I don't want tabs to be expanded.
Does such a function exist?
I have a wxStyledTextCtrl
and I want to find the column number of a given position in the document. Basically I want a function like GetColumn
but I don't want tabs to be expanded.
Does such a function exist?
You can use PositionToXY()
method (inherited from the base class) to get this, at least with 2.9.4 it should give you what you need. If you use 2.8 and it doesn't work for you, you should do line = LineFromPosition(pos)
and then use pos - PositionFromLine(line)
as the index in this line.