AFAIK, no. But if you want to do a little work, you could simulate the effect you want.
Drop a TPanel on your form and size it to look like a button.
Drop a TImage on the panel.
Fill the TImage with a bit map of your bit button image.
Set the tab stop property of the TPanel to True.
Set the Key Preview of the Form to True.
Process the OnKeyDown event of the form with something like this:
Code:
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Self.ActiveControl = Panel1 then
if Key = 32 then
ShowMessage( 'Panel (space bar pressed)' );
inherited;
end;
If you want to add visual feed-back of the key press, you can probably do that by fiddling the image as part of the event processing.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.