Terminal.Gui icon indicating copy to clipboard operation
Terminal.Gui copied to clipboard

Support specifying the number of lines scrolled by the mouse

Open luizfernandonb opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. No, it would be a feature to specify the lines that will be skipped when using the mouse scroll

Considering that if we open a huge text file, scrolling using the mouse scroll that currently only skips one line at a time is tiring

Describe the solution you'd like I thought of it more or less like this:

var tv = new TextView()
{
    // ...
    VerticalLinesToScroll = 5, // Anyway, any number, the default is 1, as it is currently
    HorizontalLinesToScroll = 3 // Anyway, any number, the default is 1, as it is currently, but in this case, the number would be to use with the command Shift + Mouse Scroll, which comes by default to scroll horizontally in the TextView
};

Extra note: If the values ​​are not specified, the values ​​will be the same as those that come by default in a TextView

Extra Note 2: Hope I'm not bothering you with so many issues

luizfernandonb avatar Jul 22 '22 21:07 luizfernandonb

This is great stuff. Please don't stop helping make this library better!

tig avatar Jul 23 '22 00:07 tig

HorizontalLinesToScroll = 3

I think you are meaning about HorizontalColumnsToScroll

BDisp avatar Jul 23 '22 09:07 BDisp

If it is specifically for the mouse wheel scrolling only then its probably a good idea to put the word MouseWheel in the property name. If it affects other stuff like clicking the down arrow on scrollbars (or calling the scroll Command manually) then the name you suggested would be fine @BDisp.

tznind avatar Jul 23 '22 09:07 tznind

I think it would also be awesome if the values could be made dynamic and be easily changeable after the widget is created.

This way, developers can implement use cases for additional scenarios such as being able to hold down modifier (or other) keys to scroll at different paces. (I.e. hold down CTRL to scroll 100 lines, SHIFT to scroll 10, etc.)

rsmirnov90 avatar Sep 30 '22 10:09 rsmirnov90

Any updates on this?

luizfernandonb avatar Feb 12 '23 22:02 luizfernandonb