Assume the following situation:
FrmBase
has a TPanel
named PnlClient
, align alClient
FrmDescendant
inherits from FrmBase
FrmDescendant
I change a PnlClient
propertyFrmDescendant
I place another control (say another TPanel
named PnlDescendant
) on PnlClient
and align it alClient
.PnlDescendant
now completely covers PnlClient
PnlDescendant
, not necessarily aligned, so I'm afraid to change PnlDescendant
(e.g. setting align to alNone
and resizing) and lose positionsHow can I execute 'revert to inherited' for PnlClient
?
There's nothing in the main menu, or in the popup menu for the controls in the Structure View...
Currently using Delphi 10.4.1 Sydney
This is easy for a keyboard user like myself:
Click on PnlDescendant
in the form editor to make it the focused and selected control.
Press Esc to select its parent, PnlClient
.
Press the Menu key on your keyboard to display the context menu of PnlClient
. If you have a cheap keyboard without a Menu key, press Shift+F10 instead.
Click on "Revert to Inherited". (Or, much faster: press the menu item's underlined character, probably I.)
(But notice that this will remove PnlDescendant
completely. Probably you didn't want that, but that's how it works.)
In other setups, you might also use the Tab key to move between sibling controls. You can see in the Structure tree view which one is currently focused. Tab your way through to the right one and press the Menu key (or Shift+F10).
The menu key! Wow, I have never used that ;-)
And thanks for mentioning point 5. It was not a good example in the question.
Actually, I use it almost daily (for instance, when I typeset mathematical formulae in Microsoft Word).