You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
fromkivy.uix.gridlayoutimportGridLayoutfromkivy.uix.labelimportLabelfromkivy.uix.scrollviewimportScrollViewfromkivy.core.windowimportWindowfromkivy.appimportrunTouchApplayout=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'))
foriinrange(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)
The text was updated successfully, but these errors were encountered:
wbernoudy
changed the title
bar_margin not affecting location of bar_margin only affecting the appearance of scrollbar in ScrollViewMay 17, 2017
Versions
Description
I am trying to use the
bar_margin
keyword arg of theScrollView
class to change the position of the scrollbar whenscroll_type=['bars']
. When I setbar_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 ifbar_margin=0
in order to drag the scrollbar.Code and Logs
The text was updated successfully, but these errors were encountered: