Using main buttonbar with keyboard

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8704
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Using main buttonbar with keyboard

Post by *MVV »

A few days ago I had my mouse batteries discharged and... I realized that it is impossible to use buttonbar with keyboard.
User avatar
MVV
Power Member
Power Member
Posts: 8704
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post 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;
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Just wait…

Post 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
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
Post Reply