hi everyone I have a list of buttons and I want to make them scrolling by touching
I made a canvas inside it frame contain the buttons now how can I make them scrolling?
I have try this :
def on_button_drag_(event):
global start_y_T
global current_y
current_y = event.y
dy = current_y - start_y_T
start_y_T = current_y
#a = sum(isinstance(item, str) for item in menuT)*132
# Calculate the desired position for the canvas view
b = aa * 210
position = types_canvas.yview()[0] + (-dy / b) # Adjust the divisor to control the scroll speed
types_canvas.yview_moveto(position)
but the scrolling is too slow and when I try to make it fast the scrolling fail
New contributor
Ahmed Ahmed is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.