Jump to content


Photo

Horizontal scrolling with wheel mouse


  • Please log in to reply
4 replies to this topic

#1 Marc

Marc
  • Members
  • 62 posts

Posted 17 September 2007 - 10:23 PM

A lot of my users are not appreciate the "horizontal scrolling" when you use wheel mouse and there is only one page on the screen.

Could you fix this ?

Thanks

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 17 September 2007 - 10:38 PM

Hello Marc,

This is a feature, it appear in Windows Explorer too.

I will add one more flag in Options to enable/disable this feature.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Marc

Marc
  • Members
  • 62 posts

Posted 17 September 2007 - 10:50 PM

QUOTE (Boki (Berg) @ Sep 17 2007, 11:38 PM) <{POST_SNAPBACK}>
Hello Marc,

This is a feature, it appear in Windows Explorer too.

I will add one more flag in Options to enable/disable this feature.

Best regards


Thanks

#4 Marc

Marc
  • Members
  • 62 posts

Posted 24 September 2007 - 10:59 PM

I have updated wheel mouse comportment in my app like this :

CODE
procedure TfMain.FormMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint;
  var Handled: Boolean);
var
  ndbgGrid: TNextDBGrid;
begin
  ndbgGrid := nil;

  if (ActiveControl is TNextDBGrid) and (ActiveControl.Focused) then
    ndbgGrid := TNextDBGrid(ActiveControl);

  if ndbgGrid <> nil then
  begin
    ndbgGrid.SelectedRow := ndbgGrid.SelectedRow - WheelDelta div 120;
    Handled := True;
  end;
end;


after tuning off the wheelmouse property of nextdbgrids

#5 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 24 September 2007 - 11:27 PM

Hello Marc,

I have update my version and fix this bug. You may replace next procedure in NxCustomGrid.pas:

CODE
function TNxCustomGrid.DoMouseWheelDown(Shift: TShiftState; MousePos: TPoint): Boolean;
begin
  Result := inherited DoMouseWheelDown(Shift, MousePos);
  if Result and not(gtEdit in GridState) then
  begin
    case (VertScrollBar.Max > 0) and (VertScrollBar.Position < VertScrollBar.Max) of
      True: if ssCtrl in Shift then VertScrollBar.PageDown else VertScrollBar.Next;
      else if (GridStyle = gsReport) and (HorzScrollBar.Max > 0) and not VertScrollBar.Visible
        then if ssCtrl in Shift then HorzScrollBar.PageDown else HorzScrollBar.Next;
    end;
  end;
end;


I hope that this is what you need.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users