How do I 'revert to inherited' if control is not clickable?

119 views Asked by At

Assume the following situation:

  • FrmBase has a TPanel named PnlClient, align alClient
  • FrmDescendant inherits from FrmBase
  • In FrmDescendant I change a PnlClient property
  • In FrmDescendant I place another control (say another TPanel named PnlDescendant) on PnlClient and align it alClient.
    PnlDescendant now completely covers PnlClient
  • I place lots of other components on PnlDescendant, not necessarily aligned, so I'm afraid to change PnlDescendant (e.g. setting align to alNone and resizing) and lose positions

How 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

1

There are 1 answers

4
Andreas Rejbrand On BEST ANSWER

This is easy for a keyboard user like myself:

  1. Click on PnlDescendant in the form editor to make it the focused and selected control.

  2. Press Esc to select its parent, PnlClient.

  3. 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.

  4. Click on "Revert to Inherited". (Or, much faster: press the menu item's underlined character, probably I.)

  5. (But notice that this will remove PnlDescendant completely. Probably you didn't want that, but that's how it works.)