Get caret position in x,y pixel in RichtextCtrl

How we get caret position in x,y pixel to window. i tried following method but it only gives column and row for given position.

 windowCaretPosition = self.__editor.PositionToXY(self.__editor.GetInsertionPoint())

it returns tuple with column and row. but i need x,y point show to context menu near caret when key up

Have you tried

windowCaretPosition = self.__editor.GetCaret().GetPosition()

``

I’m not sure if its in screen coords but you could calculate that.

···

On Tuesday, September 9, 2014 2:48:03 AM UTC-4, Nagarajan Babu wrote:

How we get caret position in x,y pixel to window. i tried following method but it only gives column and row for given position.

 windowCaretPosition = self.__editor.PositionToXY(self.__editor.GetInsertionPoint())

it returns tuple with column and row. but i need x,y point show to context menu near caret when key up

thank you

···

On Wednesday, September 10, 2014 6:15:11 AM UTC+5:30, iamt...@gmail.com wrote:

Have you tried

windowCaretPosition = self.__editor.GetCaret().GetPosition()

``

I’m not sure if its in screen coords but you could calculate that.

On Tuesday, September 9, 2014 2:48:03 AM UTC-4, Nagarajan Babu wrote:

How we get caret position in x,y pixel to window. i tried following method but it only gives column and row for given position.

 windowCaretPosition = self.__editor.PositionToXY(self.__editor.GetInsertionPoint())

it returns tuple with column and row. but i need x,y point show to context menu near caret when key up