title: How to trigger tkinter's "<Enter>" event with mouse down?
body: <p>In tkinter with Python 3.7, the default behavior for an event binding is that an "&lt;Enter&gt;" event will not be triggered after the mouse has been clicked down before it has been released. I was intending to implement a scrollable table such that it detects "&lt;Button-1&gt;" (Mouse left-click down) and "&lt;ButtonRelease-1&gt;" (Mouse left-click up) events as well as having each table-row's widgets "&lt;Enter&gt;" event bound to detect when the mouse pointer enters a different table row. In this way I could scroll my table by clicking an row and dragging through a table. My assumption was that "&lt;Enter&gt;" events would be triggered even while the mouse button is held down, which was incorrect. So, my entire scrolling implementation hit a brick wall. I need these events to be triggered while the mouse is down or it just won't work. I'm doing something like:</p>
  
  <pre><code>from tkinter import *
  
  class App:
      def __init__(self):
          self.root = Tk()
          # The name kwarg is used to infer the index of the row in the event handlers.
          self.labels = [Label(text=f"Label #{i}", name=f"row-{i}") for i in range(5)]
          for row, label in enumerate(self.labels):
              label.bind("&lt;Button-1&gt;", self.mouse_down)
              label.bind("&lt;ButtonRelease-1&gt;", self.mouse_up)
              label.bind("&lt;Enter&gt;", self.mouse_enter)
              label.grid(row=row, column=0)
          mainloop()
  
      def mouse_up(self, event):
          idx = self.index_from_event(event)
          # Do some with the row with the passed index
  
      def mouse_down(self, event):
          idx = self.index_from_event(event)
          # Do some with the row with the passed index
  
      def mouse_enter(self, event):
          # I would like for this to be triggered even when the mouse is pressed down.
          # However, by default tkinter doesn't allow this.
          pass
  
      def index_from_event(self, event):
          # Get the index of the row from the labels name string.
          return str(event.widget).split('-')[-1]
  </code></pre>
  
  <p>Any way to enable mouse enter events while the mouse button 1 is held down in tkinter? All the docs on effbot (<a href="http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm" rel="nofollow noreferrer">http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm</a>) say about the enter event is:</p>
  
  <pre><code>&lt;Enter&gt;
      The mouse pointer entered the widget (this event doesn’t mean that the user pressed the Enter key!).
  </code></pre>