Python Forum
[Kivy] Not listen for multi clicks
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Kivy] Not listen for multi clicks
#1
Hi, I have Kivy app that sometimes making some heavy stuff.
It makes the user to sometimes click/touch two/three times, but I wish to ignore this click.
Right now, the clicks "saves" and will be executed after the first click.

My goal is to ignore them. Is it possible?

example.kv
<Upload>
    name:"upload"
    BoxLayout:
        orientation: 'vertical'
        Label:
            id: nr_label
            size_hint: (1, 1)
            font_size:24
            text: "0"
        Button:
            size_hint: (1, 1)
            text: "Increase"
            on_release: root.increase()
class Upload(Screen):
    nr = 0

    def increase(self):
        self.nr += 1
        sleep(1)  # Do some heavy stuff
        self.ids.nr_label.text = str(self.nr)
If I run this example the app lock the button in one second, and after that I don't want anything to happen, even if I have click multi times on the button.
Reply


Messages In This Thread
Not listen for multi clicks - by dipbox - Nov-18-2021, 09:28 AM
RE: Not listen for multi clicks - by Barrowman - Nov-18-2021, 02:02 PM
RE: Not listen for multi clicks - by dipbox - Nov-18-2021, 04:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question [Tkinter] Checkbutton clicks events does not update visually. nicolaask 1 3,044 Dec-20-2020, 06:11 PM
Last Post: nicolaask

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020