Recent

Author Topic: disabled celll scroll in dbgrid,  (Read 7375 times)

cpalx

  • Hero Member
  • *****
  • Posts: 754
disabled celll scroll in dbgrid,
« on: June 09, 2011, 10:13:54 pm »
there is a "auto effect" in dbgrid, when i scroll the wheel mouse the rows move too, but i dont want it. How can i?
« Last Edit: June 11, 2011, 02:34:27 am by cpalx »

VTwin

  • Hero Member
  • *****
  • Posts: 1227
  • Former Turbo Pascal 3 user
Re: diabled celll scroll in dbgrid,
« Reply #1 on: June 10, 2011, 12:31:47 am »
Perhaps this:

MouseWheelOption := mwGrid

might do what you want.

Frederick
« Last Edit: June 10, 2011, 12:34:42 am by Frederick »
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 15.3.2: Lazarus 3.8 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 3.8 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 3.8 (64 bit on VBox)

cpalx

  • Hero Member
  • *****
  • Posts: 754
Re: diabled celll scroll in dbgrid,
« Reply #2 on: June 10, 2011, 12:54:07 am »
but where?

VTwin

  • Hero Member
  • *****
  • Posts: 1227
  • Former Turbo Pascal 3 user
Re: diabled celll scroll in dbgrid,
« Reply #3 on: June 10, 2011, 01:14:16 am »
Sorry, that is defined in TCustomDrawGrid, not TCustomGrid, so is not in TDBGrid. I was using it in a TDrawGrid.
« Last Edit: June 10, 2011, 01:16:06 am by Frederick »
“Talk is cheap. Show me the code.” -Linus Torvalds

Free Pascal Compiler 3.2.2
macOS 15.3.2: Lazarus 3.8 (64 bit Cocoa M1)
Ubuntu 18.04.3: Lazarus 3.8 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 3.8 (64 bit on VBox)

cpalx

  • Hero Member
  • *****
  • Posts: 754
Re: disabled celll scroll in dbgrid,
« Reply #4 on: June 11, 2011, 02:38:28 am »
Any idea?

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: disabled celll scroll in dbgrid,
« Reply #5 on: June 11, 2011, 02:51:10 am »
Not very nice, but works (with TStringGrid):
Code: [Select]
procedure TForm1.StringGrid1MouseWheelDown(Sender: TObject; Shift: TShiftState;
  MousePos: TPoint; var Handled: Boolean);
begin
  StringGrid1.Row:=StringGrid1.Row-1;
end;

procedure TForm1.StringGrid1MouseWheelUp(Sender: TObject; Shift: TShiftState;
  MousePos: TPoint; var Handled: Boolean);
begin
  StringGrid1.Row:=StringGrid1.Row+1;
end;
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

cpalx

  • Hero Member
  • *****
  • Posts: 754
Re: disabled celll scroll in dbgrid,
« Reply #6 on: June 23, 2011, 05:52:46 pm »
but does not work with dbgrid :(

 

TinyPortal © 2005-2018