Page 1 of 1

Using main buttonbar with keyboard

Posted: 2008-12-28, 14:31 UTC
by MVV
A few days ago I had my mouse batteries discharged and... I realized that it is impossible to use buttonbar with keyboard.

Posted: 2008-12-28, 14:43 UTC
by MVV
If main buttonbar use TToolBar as base class, it might be achieved by calling TToolBar.SetFocus and using in form's OnKeyDown handler following code for clicking on selected button (for flat toolbar):

Code: Select all

  index := toolbar1.Perform(TB_GETHOTITEM, 0, 0);
  toolbar1.Buttons[item].Click;

Just wait…

Posted: 2008-12-28, 18:48 UTC
by Clo
2MVV

:) Hello !

• Just wait for TC 7.5, glance HERE - §8… and meanwhile, care to keep your battery full ! :D

:mrgreen: KR
Claude
Clo