unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DBCtrls, Grids, DBGrids,
DB, DBTables, XPMan;
type
TMyDBGrid =
class(TDBGrid)
protected
procedure UpdateScrollBar;
override;
end;
TForm1 =
class(TForm)
Table1: TTable;
DataSource1: TDataSource;
DBImage1: TDBImage;
DBMemo1: TDBMemo;
Button1: TButton;
XPManifest1: TXPManifest;
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
FDBGrid : TMyDBGrid;
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
FDBGrid:=TMyDBGrid.Create(Self);
FDBGrid.Parent:=Self;
FDBGrid.Left:=32;
FDBGrid.Top:=16;
FDBGrid.DataSource:=DataSource1;
FDBGrid.Scrollbars:=ssNone;
// schaltet nur den horizontalen Scrollbar aus
end;
{ TDBGridScrollbarsHack }
procedure TMyDBGrid.UpdateScrollBar;
begin
// inherited;
// Hier nichts machen. Dadurch wird der vertikale Scrollbar unterdrückt
end;
end.