Make a TDBGrid without a vertical scrollbar  

Send By: Radikal (Q3 Team)
Web : http://www.q3.nu
Email: radikal@q3.nu
Date: 29/12/99

Tip accessed 744 times

 



Here you have a new component DBGrid that doesn't have vertical scrollbar.
You only have to save the code in a file called DBgridNoSc.PAS and then to install it in Delphi like a component.




 unit DBgridNoSc;

 interface

 uses
   WinTypes, WinProcs, Classes, DBGrids;

 type
   TDBgridNoSc = class(TDBGrid)
   protected
     procedure Paint; override;
   end;

 procedure Register;

 implementation

 procedure TDBgridNoSc.Paint;
 begin
   SetScrollRange(Self.Handle, SB_VERT, 0, 0, False);
   inherited Paint;
 end;

 procedure Register;
 begin
   RegisterComponents('Data Controls', [TDBgridNoSc]);
 end;
 end.