BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do I change a Form ancestor type.

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General)
View previous topic :: View next topic  
Author Message
Phil Grace
Guest





PostPosted: Wed Jan 21, 2004 10:45 am    Post subject: How do I change a Form ancestor type. Reply with quote



ENV : Delphi 7

Hi I have a project with quite a few forms, all derived from TForm.
What I would like to do is create a TBaseForm (derived from TForm),
put some common functionality in it, and have all my other forms
derive from TBaseForm rather than TForm.

I've tried to do this by simply using a text editor (outside of
Delphi) to change the class of the form to TBaseForm, but this seems
to have no effect (it even compiles ok, but doesn't inherit the
"middle" form).

How can I do this without building all my forms from the gound up.

Cheers,
Phil.
Back to top
El Lorenzo
Guest





PostPosted: Wed Jan 21, 2004 8:51 pm    Post subject: Re: How do I change a Form ancestor type. Reply with quote



Quote:
Hi I have a project with quite a few forms, all derived from TForm.
What I would like to do is create a TBaseForm (derived from TForm),
put some common functionality in it, and have all my other forms
derive from TBaseForm rather than TForm.
snip

I usually create the form required then save it in the repository (right
click on the form) - once there, you can inherit from that each time you
wish to use a new form - just select FILE | NEW | OTHER then select the
form. The various options such as inheritance are shown as radio buttons at
the bottom of the selection.

Laurie..




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi (General) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.