I'm have TTabControl with some controls (Delphi XE7 Firemonkey app). All works fine, tabstop too. Now I need to colorize one panel with CheckBox. Add TRectangle to this panel and set parent for CheckBox to this TRectangle. Interface looks fine but now this CheckBox not in the taborder list and not received tabstop command.
How to fix this issue?
How to reproduce: Add to the form TRectangle, add 3 CheckBox, move one CheckBox3 to the TRectangle using Structure panel (set TRectangle as parent for the CheckBox3). Run this application and try navigation using Tab key. You can't navigate to the CheckBox3!
You either have to manually set
TabOrder
to some (reasonable) value becauseTShape
doesn't have it published and is thus set to-1
(which does the same thing asTabStop = False
) or doesn't place theTCheckBox
in theTRectangle
, just place it in front of theTRectangle
so it draws over theTRectangle
.Another option is not to use the
TRectangle
at all and change the style of theTPanel
: Right click on the panel in the designer and selectEdit Custom Style...
. Then select the style newly created for you (something likepanel1style: TRectangle
) and changeFill
property however you need. ClickApply and Close
and you're done. By using styles you can create complex looks for any control that may look simple at first. For more information see http://docwiki.embarcadero.com/RADStudio/XE7/en/Customizing_FireMonkey_Applications_with_Styles and related topics.