Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
今日の私の質問は、canvas.bind() を使用して押されていないマウス ボタンを検出する方法があるかどうかを知りたいということです。ボタンが押されている間はデータを保存し、ボタンが押されなくなったらデータの保存を停止したいので、それを知りたいです。マウスの左ボタンでこれを行いたい / ''
私が何をしたくないのかわからない場合; コメントでお気軽にお尋ねください:/
マウスのプレスおよびリリース イベントを検出します。これらのイベントのいずれかが発生したら、必要に応じて保存を開始または停止します。
canvas.bind("<Button-1>", start_saving) canvas.bind("<ButtonRelease-1>", stop_saving)