123456
asked on
Disabling Dbgrid Scrollbars
Hi,
How can i Disable Dbgrid Scrollbars ?
Regards
How can i Disable Dbgrid Scrollbars ?
Regards
ASKER
hi,
Can you tell me how can i use of your paint procedure in my Dbgrid procedures?
Can you tell me how can i use of your paint procedure in my Dbgrid procedures?
123456,
this is code for a new component i 'dont know how to use in dbgrid self.....sorry.
this is code for a new component i 'dont know how to use in dbgrid self.....sorry.
hi,
on the Form OnShow fill:
procedure TForm1.FormShow(Sender: TObject);
begin
ShowScrollBar(DBGrid1.Hand le, SB_VERT, False);
ShowScrollBar(DBGrid1.Hand le, SB_HORZ, False);
end;
and on the DBGrid.DataSource.OnDataCh anged:
procedure TForm1.DataSource1DataChan ge(Sender: TObject; Field: TField);
begin
ShowScrollBar(DBGrid1.Hand le, SB_VERT, False);
ShowScrollBar(DBGrid1.Hand le, SB_HORZ, False);
end;
Bogdan
on the Form OnShow fill:
procedure TForm1.FormShow(Sender: TObject);
begin
ShowScrollBar(DBGrid1.Hand
ShowScrollBar(DBGrid1.Hand
end;
and on the DBGrid.DataSource.OnDataCh
procedure TForm1.DataSource1DataChan
begin
ShowScrollBar(DBGrid1.Hand
ShowScrollBar(DBGrid1.Hand
end;
Bogdan
ASKER
hi,
bpana, you answer is better than thosebug,
but when i moved through records, scroll bar disappear on bad form,do any way existed That We tell dbgrid one Time For disappearing Scrollbars,and We dont need to Tell it after any changing in datasource .
bpana, you answer is better than thosebug,
but when i moved through records, scroll bar disappear on bad form,do any way existed That We tell dbgrid one Time For disappearing Scrollbars,and We dont need to Tell it after any changing in datasource .
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
inherited Paint;
end;
procedure Register;
begin
RegisterComponents('Data Controls', [TDBgridNoSc]);
end;
end.