GUI Button hold down - tkinter

后端 未结 5 816
天命终不由人
天命终不由人 2020-12-06 15:50

I\'m trying to do a GUI in python to control my robotic car. My question is how I do a function that determine a hold down button. I want to move the car when the button is

5条回答
  •  一整个雨季
    2020-12-06 16:25

    You might want to try the repeatinterval option. The way it works is a button will continually fire as long as the user holds it down. The repeatinterval parameter essentially lets the program know how often it should fire the button if so. Here is a link to the explanation:

    http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/button.html

    Search in-page for "repeatinterval".

    Another name for this parameter is repeatdelay.

提交回复
热议问题