Search code examples
pythontkintertkintermapview

How do I remove the right click popup in a tkintermapview-window?


I'm trying to remove the popup with the coordinates that appears when the map is right clicked.

I have tried the unbind('<Button 3>') but it did nothing.

This is the menu I would like to remove

The picture above shows the coordinates that pops up on a right click.


Solution

  • You need to call .unbind() on the internal canvas widget:

    # assume mapview is the instance of TkinterMapView
    mapview.canvas.unbind("<Button-3>")