Re: textctrl.PositionToXy
Tim Roberts <[email protected]> Wed, 16 Feb 2022 22:32:46 -0800
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
On 2/16/22 16:06, Nathan smith wrote: > > could someone give me a quick rundown of what textCtrl.PositionToXy=20 > actually does? > > According to the documentation it returns a 0 based line position and=20 > 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=20 > 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.=C2=A0 You can look at the wxWidgets C++ reference for= =20 that.=C2=A0 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=20 > 169 lines in it. Interesting.=C2=A0 Does it return a reasonable X?=C2=A0 What was the=20 GetInsertionPoint value? --=20 Tim Roberts, [email protected] Providenza & Boekelheide, Inc. --=20 You received this message because you are subscribed to the Google Groups "= wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/= wxpython-users/d4c943c1-bd2b-73ba-56f9-a165229451af%40probo.com.