Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23305

how can I make a touch scrolling button in tkinter?

$
0
0

hi everyone I have a list of buttons and I want to make them scrolling by touchingI 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


Viewing all articles
Browse latest Browse all 23305

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>