

> I have a canvas with some editable text (with create_text) in it. The above programs help us to achieve deep insight into Tkinter entry widgets and the sophisticated manner of using them. I am workin from memory here, so don't tak my word for it. Parameter, and this event object includes the x and y of the cursor When the method is called, it gets an event object as one (not only clicks on your canas, but also movement)
ICURSOR PYTHON TKINTER INSTALL
Click the Install Game button to initiate the file download and get. (since the top-left corner of the visible canvas may not be (0,0) of The sad part is that it only clicks, it cannot move the mouse cursor for you. If you canvas is scrolled, then you need to adjust these coordinates If the mouse pointer isn't on the same screen, returns (-1, -1). Returns a tuple (x, y) containing the coordinates of the mouse Subject: Re: Cursor coordinatesĪ general method on all widgets w.winfo_pointerxy() so we dont need to import any further Tkinter modules later on. I was asking if there is an existing function like the index() but to return the x,y position in the canvas.įrom: micko.madrid at on behalf of Michael O'Donnell Design a simple python application using the Tkinter package In this post. Print "cursor character position=",canvas.index(txt, INDEX)īut how do I get the canvas x,y of the cursor?Ĭurrently I am making a binary search within the limits of the bounding box searching for the x,y corresponding to the character location returned by the index() method.

# place the cursor on the fifth character Txt = canvas.create_text(xt,yt,text="blahblah)
ICURSOR PYTHON TKINTER FULL
In my project I have created a full text editor inside the canvas for floating text elements. On my previous email I was asking to find the position (x,y) of the text-cursor or alternative the bbox of a single character from a text element inside a canvas. Thank you Michael, I was looking also for that function but for another task. When the user hover the mouse cursor over the widget area the tooltip will be displayed with the.

Cursor coordinates Vasilis Vlachoudis Vasilis.Vlachoudis at cern.ch Tooltip is used to display some description about the specific widget or tool to the user which helps to know that what is the function of that particular tool.
