Главная страница | назад





Article #16699: Showing dbgrid is disabled

 Question and Answer Database
FAQ1699D.txt Showing dbgrid is disabled
Category :VCL
Platform :All
Product :All 32 bit
Question:
Some of the database components (notably the TDBGrid component)
does not turn gray or give any visual notification when the
control is disabled. How can I provide this functionability?
Answer:
The following example demonstrates changing the text color of the
control to clGray when the control is disabled, giving a visual
indication that the control is disabled.
procedure TForm1.Button1Click(Sender: TObject);
begin
DbGrid1.Enabled := false;
DbGrid1.Font.Color := clGray;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
DbGrid1.Enabled := true;
DbGrid1.Font.Color := clBlack;
end;
7/16/98 4:31:28 PM

Last Modified: 01-SEP-99