Recent

Author Topic: Let's make Shift+wheel scroll Treeview horizontally  (Read 742 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Let's make Shift+wheel scroll Treeview horizontally
« on: January 30, 2023, 06:02:00 pm »
as now, Treeview is not scrolled horizontally when I do Shift+wheel scrolling.
i suggest to embed this featire on LCL level.
at least for Treeview + Listview.

what I did in my text editor. very simple change:

Code: Pascal  [Select][+][-]
  1. type
  2.   TAppTreeView = class(TTreeView)
  3.   protected
  4.     function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override;
  5. ....
  6.  
  7. function TAppTreeView.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer;
  8.   MousePos: TPoint): Boolean;
  9. begin
  10.   if ssShift in Shift then
  11.   begin
  12.     Result:= DoMouseWheelHorz(Shift, -WheelDelta, MousePos);
  13.   end
  14.   else
  15.   begin
  16.     Result:= inherited;
  17.   end;    
  18. ..
  19.  

let's embed this change to LCL?

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Let's make Shift+wheel scroll Treeview horizontally
« Reply #1 on: January 30, 2023, 06:51:14 pm »
Why don't you add merge request to lazarus git ?

Thaddy

  • Hero Member
  • *****
  • Posts: 14204
  • Probably until I exterminate Putin.
Re: Let's make Shift+wheel scroll Treeview horizontally
« Reply #2 on: January 30, 2023, 06:51:24 pm »
Nope. Counter intuitive. Why do not use crtl-tab-mousewheel? That seems to have a bit more feel to it when changing between controls.
Specialize a type, not a var.

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: Let's make Shift+wheel scroll Treeview horizontally
« Reply #3 on: January 30, 2023, 06:53:25 pm »
@zeljko
because I am not sure this change is okay for devs.

@Thaddy
it is common feature in many apps. Lazarus IDE under gtk2, Sublime Text, other editors from MS, other IDEs, GEdit.

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: Let's make Shift+wheel scroll Treeview horizontally
« Reply #4 on: January 30, 2023, 06:59:54 pm »
And FireFox also supports it! (cannot try the Chrome)

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Let's make Shift+wheel scroll Treeview horizontally
« Reply #5 on: January 30, 2023, 07:44:22 pm »
@zeljko
because I am not sure this change is okay for devs.

@Thaddy
it is common feature in many apps. Lazarus IDE under gtk2, Sublime Text, other editors from MS, other IDEs, GEdit.

If it works under Delphi in same way then it will be implemented w/o complains.

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Re: Let's make Shift+wheel scroll Treeview horizontally
« Reply #6 on: January 31, 2023, 03:55:33 pm »
It is not working in Delphi 7 nor on Delphi 10.4 IDEs, so you may decline the wish.

Thaddy

  • Hero Member
  • *****
  • Posts: 14204
  • Probably until I exterminate Putin.
Re: Let's make Shift+wheel scroll Treeview horizontally
« Reply #7 on: January 31, 2023, 05:59:11 pm »
The reason I suggested ctrl-tab- mouse wheel is that it has a horizontal feel by nature. Of course feel free to suggest another key combination.
Specialize a type, not a var.

 

TinyPortal © 2005-2018