I am coding a program which searches for the path in a maze, I’m currently working on the maze building GUI where the user can drag and drop. I successfully made the grid and when then pointer hovers on each cell then the cell changes it’s background colour, but now the problem is, while testing whether the drag and drop GUI will work, I first held the left mouse button and then bought my pointer on the cell but the cell did not change background, which binding would allow me to change the background colour of a Label when pointer is bought onto it? there are over 720 cells in the grid and it took around 4000 lines for all the cells together so I’ll show the code for the first cell:
cell0 = Label(grid_frame, bg = bg, height = 2, width = 4) cell0.bind("<Enter>", lambda event: cell0.config(bg = "#272a2e")) cell0.bind("<Leave>", lambda event: cell0.config(bg = bg))
which binding should I use?