We help IT Professionals succeed at work.

Components not appearing at design time on descendent forms

rossmcm
rossmcm asked
on
I have a project where I derive descendents from an ancestor form.  I have


  TMyForm = class (TForm)

  TAnotherForm = class (TMyForm)

  TYetAnotherForm = class (TAnotherForm)


I have added components to TAnotherForm at design time and they appear in that form and it's descendent, but nothing I add to the original TMyForm at design time is visible in the descendents at  design time.  They appear at run-time only.  This is a pain.

I want to add an empty controlbat to MyForm and then add different speed button to the descendents.  As the Controlbar doesn't appear in the descendents I can't add any buttons at design time.  If I add the control bar to TAnotherForm it appears in decendents of that for at design time.

I think this has occurred necause of something I did early on in the project (renaming the form or similar) and D5 has 'lost' the relationship between the ancestor and it's descendent.  

Can anyone tell be how to unconfuse D5?

Ross  
Comment
Watch Question

right-click on your TAnotherForm form in the Delphi IDE, and choose View As Text

the first line should read something like this:

object AnotherForm: TAnotherForm

try changing it to

inherited AnotherForm: TAnotherForm



Caution: Please back up your file before doing this :)

Author

Commented:
Brilliant.  Thank you.
You are most welcome :)

Sorry wasn't able to reply earlier, because EE was down

Explore More ContentExplore courses, solutions, and other research materials related to this topic.