Subject Re: [IBO] TIB_TransactionBar Help Messages
Author sdbeames
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
> At 12:39 AM 17/08/2003 +0000, you wrote:
> >Hi,
> > is there a way to change a TIB_TransactionBar's button help
> >messages, eg "Post Datasets and Commit and Retain Current
> >Transaction", to something more user friendly, other than changing
> >it in IB_Constants.pas?
> >
> >IBO4.2.Ie
>
> Have you tried this?
>
--snip--
>
> procedure TForm1.DoInitTBHints;
> var
> I: TIB_TransactionBar_ButtonType;
> Btn: TIB_TransactionBar_Button;
> begin
> with IB_TransactionBar1 do
>
> begin
> for I := Low(Buttons) to High(Buttons) do begin
> Btn := Buttons[ I ];
> case I of
> tbStart: Btn.Hint := 'my Start Transaction';
> tbPostAll: Btn.Hint := 'my Post Datasets';
> tbCancelAll: Btn.Hint := 'my Cancel Datasets';
> tbSavePoint: Btn.Hint := 'my Commit and Retain Current
Transaction';
> tbCommitRetaining: Btn.Hint := 'my Post Datasets and Commit
and Retain Current Transaction';
> tbCommit: Btn.Hint := 'my Commit and End Current Transaction';
> tbRollback: Btn.Hint := 'my Rollback and End Current
Transaction';
> tbRollbackRetaining: Btn.Hint := 'my Rollback and Retain
Current Transaction';
> tbClose: Btn.Hint := 'my Close Current Transaction';
> end;
> end;
> end;
>
> end;
>
> end.
>
> cheers,
> Helen

Thanks Helen,
I've tried my BCB version of this, but the changes aren't sticky. I
believe it's due to a call in IB_TransactionBar.pas to InitHints
within SysStateChanged. I moved this call to InitButtons and it
solved MY problem.

Is there a reason why this call is placed here? I can imagine it
makes sense for the other TIB_xxxBars where the current query can
change the button hints, but this facility doesn't seem to exists for
the TransactionBar(?). I wonder if this code was just copied from the
other bars during initial development? I'll send my change to Jason
if no-one can see a problem with it. I only use a single
transaction....would multiple transactions show a problem?

Cheers,
Steve