Error with TOracleNavigateBtn

rdiez

Member²
Hi I've a problema with a Component TOracleDbNavigator. I need to close a form when the user click on the cancel button.

procedure Form1.DbNavigator1Click(Sender: TObject;Button: TOracleNavigateBtn);
begin
if (Button = nbCancel) then Close;
end;

The error in design is:
Incompatible types: 'TOracleNavigateBtn' and 'TNavigateBtn'.

Ok. But if I compare Button with onbCancel the message is onbCancel not found.

What's the problem?? Thanks.
 
This name clash for the navigator buttons occurs if you have both the standard DBCtrls unit is listed after the OracleNavigator unit in the uses clause of your form. You can change this order, or you can explicitly prefix the button name with the unit:

if (Button = OracleNavigator.nbCancel) then Close;

------------------
Marco Kalter
Allround Automations

[This message has been edited by mkalter (edited 27 June 2002).]
 
Back
Top