Scrollview scrolling on button press

125 views
Skip to first unread message

JC Oswalt

unread,
Jul 17, 2020, 6:21:08 PM7/17/20
to Kivy users support
am using Kivy on a Raspberry Pi to make a touch app using the 7 inch touchscreen. Right now, whenever I use buttons in a scrollview or recycleview, pressing down on a button causes the scrollview to scroll. Is there a parameter I could set to have the scrollview lock scrolling if a button in the scrollview is pressed? Here is an example of some code that I am testing:

from kivy.app import App
from kivy.core.window import Window
from kivy.lang import Builder
from kivy.uix.recycleview import RecycleView

Window.fullscreen = 'auto'
Window.show_cursor = False

Builder.load_string('''
<RV>:
    scroll_timeout: 140
    scroll_distance: 10
    viewclass: '
Button'
    RecycleBoxLayout:
        default_size: None, dp(80)
        default_size_hint: 1, None
        size_hint_y: None
        height: self.minimum_height
        orientation: '
vertical'
'''
)

class RV(RecycleView):
   
def __init__(self, **kwargs):
       
super(RV, self).__init__(**kwargs)
       
self.data = [{'text': str(x)} for x in range(20)]



class TestApp(App):
   
def build(self):
       
return RV()

if __name__ == '__main__':
   
TestApp().run()


Elliot Garbus

unread,
Jul 17, 2020, 7:39:09 PM7/17/20
to kivy-...@googlegroups.com

I’m not a Raspberry Pi expert, but it sounds like you have a configuration problem with the I/O on the Raspberry Pi.

https://kivy.org/doc/stable/api-kivy.input.html

https://kivy.org/doc/stable/api-kivy.input.providers.probesysfs.html

https://kivy.org/doc/stable/api-kivy.input.providers.html

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/706cd1af-f815-48bd-8b4e-c09100c60533o%40googlegroups.com.

 

Reply all
Reply to author
Forward
0 new messages