[Lazarus] Cool IDE add-on idea

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Wed Apr 25 00:03:56 CEST 2018

On 2018-04-24 21:20, Ondrej Pokorny via Lazarus wrote:
>> Unfortunately that's how the TToolBar works. No chance to change it. 
>> We'd need a new toolbar component that would accept focus for the tool 
>> buttons.
> There is one way to do it more simply: add &-hotkeys to the buttons.
> E.g. the help button can be triggered with Alt+H (because the caption is 
> &Help). Adding &-hotkeys to other buttons will allow to trigger them 
> with a keyboard as well.

I was just going to suggest that, then read your second reply. :-)

My other suggestion was to simply place a TActionList on each Package
windows. Then define all the actions with associated shortcuts. The
Captions of each TAction doesn't need to contain the & symbol for a
hotkey (though highly recommended). The defined TAction.Shortcut
property works just fine without the & in the TAction.Caption. The for
should then process those shortcuts as part of any keyboard event in the
form. That's all part of the benefits in using actions.


fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

My public PGP key:  http://tinyurl.com/graeme-pgp

More information about the Lazarus mailing list