Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bar_margin only affecting the appearance of scrollbar in ScrollView #5184

Closed
wbernoudy opened this issue May 17, 2017 · 1 comment
Closed

Comments

@wbernoudy
Copy link
Contributor

Versions

  • Python: 3.6.1
  • OS: Arch Linux
  • Kivy: 1.10.0
  • Kivy installation method: pip

Description

I am trying to use the bar_margin keyword arg of the ScrollView class to change the position of the scrollbar when scroll_type=['bars']. When I set bar_margin, the scrollbar is correctly rendered in a different position, but then it cannot be dragged using the mouse. Instead, the user still needs to click in the original spot as if bar_margin=0 in order to drag the scrollbar.

Code and Logs

from kivy.uix.gridlayout import GridLayout
from kivy.uix.label import Label
from kivy.uix.scrollview import ScrollView
from kivy.core.window import Window
from kivy.app import runTouchApp

layout = GridLayout(cols=1, spacing=10, size_hint_y=None)
# Make sure the height is such that there is something to scroll.
layout.bind(minimum_height=layout.setter('height'))
for i in range(100):
    btn = Label(text=str(i), size_hint_y=None, height=40)
    layout.add_widget(btn)
root = ScrollView(size_hint=(1, None), size=(Window.width, Window.height), scroll_type=["bars"], bar_margin=40, bar_width=20)
root.add_widget(layout)

runTouchApp(root)
@wbernoudy wbernoudy changed the title bar_margin not affecting location of bar_margin only affecting the appearance of scrollbar in ScrollView May 17, 2017
@crbp8b
Copy link

crbp8b commented May 30, 2017

I see what you mean, viewing the app that results from the code you posted. I'll take a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants