Subject Re: [IBO] iboBars Shortcut
Author Andreas Pohl
Here is what I did to synchronize TIB_Bars with TMenu:

-create TMenuItem, e.g. "dataset"
- dataset.OnClick put sth. like that

first1.enabled :=ib_NB.Buttons[ nbFirst ].Enabled;
jump1.enabled :=ib_NB.Buttons[ nbJumpBck ].Enabled;
back1.enabled :=ib_NB.Buttons[ nbPrior ].Enabled;
next1.enabled :=ib_NB.Buttons[ nbNext ].Enabled;
jump2.enabled :=ib_NB.Buttons[ nbJumpFwd ].Enabled;
end1.enabled :=ib_NB.Buttons[ nbLast ].Enabled;

Edit1.enabled :=ib_UB.Buttons[ ubEdit ].Enabled or
ib_UB.Buttons[ ubPost ].Enabled;
Insert1.enabled :=ib_UB.Buttons[ ubInsert ].Enabled;
Delete1.enabled :=ib_UB.Buttons[ ubDelete ].Enabled;

// so your menu is refecting actual state of T_IB_Bar

- create in sub menu of "dataset" an entry for each button of TIB_Bar
- put in OnClick event sth. like that

if Sender = first1 then ib_NB.BtnClick( nbFirst );
if Sender = jump1 then ib_NB.BtnClick( nbJumpBck );
if Sender = back1 then ib_NB.BtnClick( nbPrior );
if Sender = next1 then ib_NB.BtnClick( nbNext );
if Sender = jump2 then ib_NB.BtnClick( nbJumpFwd );
if Sender = end1 then ib_NB.BtnClick( nbLast );

if (Sender = Edit1) {and (ib_UB.DataSource.Dataset.Active)} then
if (ib_UB.DataSource.Dataset.State=dssBrowse) then ib_UB.BtnClick(
ubEdit )
else ib_UB.BtnClick( ubPost );
if Sender = Insert1 then ib_UB.BtnClick( ubInsert );
if Sender = delete1 then ib_UB.BtnClick( ubDelete );
if Sender = cancel1 then ib_UB.BtnClick( ubCancel );
if Sender = Refresh1 then ib_UB.BtnClick( ubRefreshAll );

// if you assign a hotkey to each menu item, so TIB_Bar is "hotkey aware"

If you use focus capabilities of TIB_Dataset,TIB_Bar etc. you get an
application wide hotkey for all datasets without any further coding!!

Mit freundlichem Gruss & Best Regards

Andreas Pohl
apohl@...
www.ibp-consult.com
----- Original Message -----
From: "Claudio Kloss" <ckloss@...>
To: "IBObjects" <IBObjects@yahoogroups.com>
Sent: Wednesday, February 28, 2001 7:21 PM
Subject: [IBO] iboBars Shortcut


> There is a way to use keyboard shortcuts in iboBars? At least with
> TIB_UpdateBar?
>
> TIA,
>
> Claudio F. Kloss
> MicroLight Informática Ltda.
> Juiz de Fora - MG - Brazil
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>