Subject Re: [IBO] IB_NavigationBar, which button was pressed ?
Author Craig L. Leonardi
>
> How can I decide that which button was pressed on the NavigationBar ?
>
Here's a snippet from my application. Here, I'm using the buttons
but replacing their default actions.

procedure TfrmPatTest.ubBSListBeforeAction(Sender: TObject);
var
Button: TIB_UpdateBar_ButtonType;
begin
Button := ubBSList.FocusedButton;
try
if (Button = ubInsert) then
BSDetail(0)
else if (Button = ubEdit) then
BSEdit(quBSList.FieldByName('BSNo').AsInteger)
else if (Button = ubDelete) then
DefMessageDlgCtr(pcPatient,
frmPatTest.Caption,
msgNotImplemented,
mtInformation, [mbOK], mrOK, 0);
finally
if (Button <> ubRefreshAll) then
SysUtils.Abort; // Need to Abort in order to avoid the default
action ...
end;
end;




>
>
>
>