Forum > LCL

[Resolved - sort of] Toolbar TabStop setting not respected

(1/2) > >>

mtrsoft:
The problem is that when "tabbing" on a form with a TToolbar and several other controls the Toolbar nor any of its buttons ever receive the focus.

I've tested this on Win7/32 with Lazarus 1.8.4 and 2.0RC2.

The issue can be seen by doing the following:

1. Create a new application.

2. Place a toolbar on the form and set its properties: ShowCaptions to True and TabStop to True.
2a. Right click on the toolbar and add two buttons on the toolbar.

3. Place two regular buttons on the form.

4. Run the application.

5. Press the Tab key multiple times. The buttons on the form will receive the focus, but neither the toolbar or any of its buttons will receive the focus.

6. Exit the program.

Am I missing something or ?

Regards,
John

Blaazen:
Buttons on TToolBar are TGraphicControl descendants, they cannot have focus (they don't even have TabStop and TabOrder properties).

mtrsoft:
Blaazen,

I realize that, BUT I would expect the toolbar to receive the focus so that one could then use the arrow key to cycle over the toolbar buttons.

I suppose the "real" question should have been "How can I access the toolbar buttons using the keyboard rather than the mouse?"

howardpc:

--- Quote ---I suppose the "real" question should have been "How can I access the toolbar buttons using the keyboard rather than the mouse?"

--- End quote ---
By building your own non-standard toolbar that uses toolbuttons which descend from TWinControl.

taazz:

--- Quote from: mtrsoft on November 11, 2018, 05:32:57 am ---Blaazen,

I realize that, BUT I would expect the toolbar to receive the focus so that one could then use the arrow key to cycle over the toolbar buttons.

I suppose the "real" question should have been "How can I access the toolbar buttons using the keyboard rather than the mouse?"

--- End quote ---
1) I always use action lists and attach an action to each tool button that way the action shortcut can be used directly.
2) are the caption of the toolbar visible? if yes then isn't the hot key working on toolbars? truly asking, I haven't tested or used that feature.

Navigation

[0] Message Index

[#] Next page

Go to full version