Subject Re: Hot Key
Author stanw1950
Helton,

Here's another way to do it. This is for both an update bar and a
search bar.

procedure MyScreen.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin

case Key of
VK_RETURN: if ((DrawingQ.State = dssEdit)
or (DrawingQ.State = dssInsert)
or (DrawingQ.State = dssSearch)) then
UpdateBar.btnClick(ubPost);

VK_F2: if DrawingQ.State = dssBrowse then
UpdateBar.btnClick(ubEdit);

VK_F4: if DrawingQ.State = dssBrowse then
SearchBar.btnClick(sbSearch);

VK_F8: if DrawingQ.State = dssBrowse then
UpdateBar.btnClick(ubInsert);

VK_ESCAPE: if btnExit.Enabled then
btnExit.Click
else if ((DrawingQ.State = dssEdit)
or (DrawingQ.State = dssInsert)
or (DrawingQ.State = dssSearch)) then
UpdateBar.BtnClick(ubCancel);
end;

end;



--- In IBObjects@y..., "helton_o" <helton_o@t...> wrote:
> Hi all,
>
> How can i associate a hot key to each button of a TIB_UpdateBar
> (ctrl+I to the insert button for example) ?
>
> Thanks,
>
> Helton