Is there a way to bind a keyboard-key to scroll horizontally?
I tried many different things and I cannot seem to put it together.
Not a keyboard-only solution, but to scroll horizontally you can do Shift + ScrollUp / ScrollDown
There is a recent commit for new commands to scroll horizontally in the editor, see commands for scrolling horizontally.. From the PR:
Each of scrollLeft and scrollRight scroll two columns (this more
or less matches the pace of the vertical scroll)
so those are the new commands.
For example:
{ "key": "ctrl+alt+left", "command": "scrollLeft" },
{ "key": "ctrl+alt+right", "command": "scrollRight" },
There is one now with VSCode 1.40 (Oct. 2019) for List/Tree:
You can now press Ctrl+Up and Ctrl+Down to scroll lists and trees using the keyboard.
If horizontal scrolling is enabled, Ctrl+Left and Ctrl+Right will also scroll horizontally.
Not find keyboard-key solution, I provide an useful mouse-using method here.
vertial scrolling : Mouse Wheel Up / Down
horizontal scrolling : Shift+Mouse Wheel Up / Down
Related
I have an ag-grid-react set up with a series of components in place for cell rendering. When my dataset loads the vertical scroll works well but the horizontal scroll isn't obvious unless using a trackpad or horizontal scroll enabled mouse.
I would like to be able to add a scroll bar to the top of the grid as well as the automatically generated one at the bottom?
Has anyone encountered this, come up with as solution?
Thanks in advance.
Note : I found this solution How to add a horizontal scrollbar on top of the ag-grid but seems this is old and not working.
I am using dragInteraction for drag and drop feature in UICollectionview. Everything works fine but when i change my scroll direction to horizontal the behaviour of dragging changed.
Ref : https://hackernoon.com/drag-it-drop-it-in-collection-table-ios-11-6bd28795b313
I mean when i use vertical scrolling the behaviour of dragging looks good like it shifted the positions, but in horizontal scrolling the behaviour is different.
like : for Horizontal which has the issue https://imgur.com/BlP63NT and vertical which works fine
https://imgur.com/GRylkQs
I have tried to find solution but not found solution for this issue, i want same behaviour of dragging while in horizontal scrolling.
It took several days trying to do this (image). And I don't find how do it.
In summary I need a scroll with snapping (like CCScrollLayer) on left, and change content panel (right) when scrolling.
I tried with CCScrollLayer, but the scroll is horizontal, and I can't resize.
I find other solutions with vertical scroll, but it is continuous scroll, and I need the same effect like CCScrollLayer (snapping).
I would be grateful if someone could help me.
I'm using the Cocos2D-iPhone framework.
I'm trying to create custom vertical UIScrollView which could handle multiple pages with different page heights.
Assumptions:
page height is equal or greater than screen height
if page is taller than screen height, it scrolls as usual UIScrollView – with bouncing on top and bottom
if user ends up scrolling and "page break" is in the middle of screen
if there is no velocity - page snaps to closest
if there is velocity - page changes to one in direction of swipe
I've tried many approaches to achieve this, but I've stumbled upon many UIScrollView quirks, which make it hard.
Problems:
UIPanGestureRecognizer has unreliable method for getting velocity (velocityInView:)
scrollViewWillEndDragging:withVelocity:targetContentOffset: method gives me headache, because it arbitrarily can destroy my attempts to animate setting content offset
I don't know how to achieve bounce in one of the middle pages, I'm afraid i would have to rewrite whole scrolling handling
when I try to override setting content offset when UIScrollView is decelerating, what I get is
my content offset is set
deceleration continues beyond content offset I set
Bonus
I have also tried putting UIScrollView inside UIScrollView as a page, but this approach was also pain in the neck. For example when I was at the bottom of inside scroll, then i scrolled down a bit, put my finger away and quickly grabbed again and scrolled upwards, the outer scroll received touch, which messed up inside scroll presentation.
Does somebody have any idea how to do this? Any tips will be helpful as I'm completely stuck...
Try this. Might help. Based on the Circa news app.
https://www.cocoacontrols.com/controls/rscircapagecontrol
I have a horizontal scroll view with paging enabled, and the children of this scroll view are vertical scroll views. It's like the iOS home screen, but imagine scrolling vertically on each home screen.
Now, when the vertical scroll is in progress, it's hard to swipe to the next or previous screen, because the vertical scroll view apparently captures the events. Even if the angle of the swipe is almost horizontal, it doesn't go to the next or previous "page". Only after the scroll stops fully can one easily swipe to the next or previous pages.
Unfortunately, because of the slow deceleration, the user might think the content stopped moving when it is in fact moving very slowly and just about to stop. But the horizontal swipe is interpreted as a vertical scroll gesture, and the scroll velocity increases, making things worse from the user's perspective.
I've noticed multiple people struggling with this when they test out our app, and I wonder if anyone here knows a solution, perhaps a way to consider the angle of the swipe to determine which scroll view should process the event. Thanks.
I would suggest stopping the vertical scroll on a touch begins event. This is how most apps I've seen do something like this.