procedure TForm1.Button1Click(Sender: TObject);
var
CrackDBNi: TCrackDBNi;
I: TNavigateBtn;
begin
CrackDBNi :=TCrackDBNi(DBNavigator1);
for I := Low(CrackDBNi.Buttons) to High(CrackDBNi.Buttons) do
begin
if not CrackDBNi.Buttons[i].Enabled then
begin
Case i of
nbFirst :Showmessage('First Disable');
nbPrior :Showmessage('Prior Disable');
nbNext :Showmessage('Next Disable');
nbLast :Showmessage('Last Disable');
nbInsert :Showmessage('Insert Disable');
nbDelete :Showmessage('Delete Disable');
nbEdit :Showmessage('Edit Disable');
nbPost :Showmessage('Post Disable');
nbCancel :Showmessage('Cancel Disable');
nbRefresh:Showmessage('Refresh Disable');
end;
end;
end;
end;
TCrackDBNi=class(TDBNavigator);
procedure TForm1.Button1Click(Sender: TObject);
var
CrackDBNi: TCrackDBNi;
I: TNavigateBtn;
begin
CrackDBNi :=TCrackDBNi(DBNavigator1);
for I := Low(CrackDBNi.Buttons) to High(CrackDBNi.Buttons) do
begin
if not CrackDBNi.Buttons[i].Enabled then
begin
Case i of
nbFirst :Showmessage('First Disable');
nbPrior :Showmessage('Prior Disable');
nbNext :Showmessage('Next Disable');
nbLast :Showmessage('Last Disable');
nbInsert :Showmessage('Insert Disable');
nbDelete :Showmessage('Delete Disable');
nbEdit :Showmessage('Edit Disable');
nbPost :Showmessage('Post Disable');
nbCancel :Showmessage('Cancel Disable');
nbRefresh:Showmessage('Refresh Disable');
end;
end;
end;
end;