OracleNavigator Component

gleyd

Member
I have a OracleNavigator component on a form. I want to be able to make buttons on it visible/invisible depending on the user.

If I try the following line:
OracleNavigator1.VisibleButtons := OracleNavigator1.VisibleButtons - [onbInsert, onbDelete, onbPost, onbCancel];

I get "Undeclared identifier: 'onbInsert' " for each button and a "Incompatable types: 'TOracleNavigateBtn' and 'Integer'" Error.

I don't see the OracleNavigator in the uses clause. If I put it in there, it gives me an error telling me that it is redeclared.

Help!!!

------------------
David Gley
gleyd@anteon.com
 
From looking at the VisibleButtons property in the Object Inspector, try using OracleNavigator1.VisibleButtons := OracleNavigator1.VisibleButtons - [nbInsert, nbDelete, nbPost, nbCancel]. This will work only if you don't use DBCtrls (the Delphi unit) in the same unit since the Delphi equivalent of that enumerated type is declared there also.

Natalie
 
I am using DBEdits on the same form, so DBCtrls needs to stay in the units. So using:
OracleNavigator1.VisibleButtons := OracleNavigator1.VisibleButtons - [nbInsert, nbDelete, nbPost, nbCancel];
gives an error "Incompatible types: TOracleNavigatetn and TNavigateBn"

Any other suggestions?

------------------
David Gley
dgley@anteon.com
 
I tried the follow since it was getting confused with ownership of the buttons and it worked. Thanks for your help.

OracleNavigator1.VisibleButtons := OracleNavigator1.VisibleButtons - [OracleNavigator.nbInsert, OracleNavigator.nbDelete, OracleNavigator.nbPost, OracleNavigator.nbCancel];

------------------
David Gley
dgley@anteon.com
 
Back
Top