On 2/16/22 16:06, Nathan smith wrote:
>
> could someone give me a quick rundown of what textCtrl.PositionToXy
> actually does?
>
> According to the documentation it returns a 0 based line position and
> column number, which I would assume to mean,:
> PositionToXy(t1.GetInsertionPoint())
> would return (x, y) where y is the line number in the widget and x is
> the character count from left to right.
That's the theory, yes.
> bug first off it returns (Bool, X, Y). What is that bool for?
Success or failure. You can look at the wxWidgets C++ reference for
that. It only fails if the incoming position is way too large.
> And second off I have a texCtrl that is returning 318 when it only has
> 169 lines in it.
Interesting. Does it return a reasonable X? What was the
GetInsertionPoint value?
--
Tim Roberts,
ti...@probo.com
Providenza & Boekelheide, Inc.