dcc32 Error Unit1.pas(284): E2010 Incompatible types: 'TNavigateBtn' and 'TNavigateButton'

1.2k views Asked by At

I want to replace a TDBNavigator with a button.

I did :

procedure TForm1.Button1Click(Sender: TObject);
begin
  DBNavigator2.BtnClick(nbNext);
end;

but I got an error :

[dcc32 Error] Unit1.pas(284): E2010 Incompatible types: 'TNavigateBtn' and 'TNavigateButton'

Please, could anyone tell me how to fix this problem?

1

There are 1 answers

4
Victoria On BEST ANSWER

Use the full type name TNavigateBtn.nbNext, for example:

DBNavigator2.BtnClick(TNavigateBtn.nbNext);

That happens most probably because you have Data.Bind.Controls unit in your uses clause. This unit declares the same named nbNext member as a part of the TNavigateButton enumeration.