Solved

inherited in Delphi

Posted on 1998-12-24
14
401 Views
Last Modified: 2010-04-04
Hello and mery christmas!!!

I have one form and i go to file new and choose project1 and find there the form i have and press ok then all buttons on the form2 will inherit from form1. how can i stop this inherit?

Cheers
Tolv

 
0
Comment
Question by:tolvumeistari
  • 6
  • 4
  • 4
14 Comments
 
LVL 10

Expert Comment

by:viktornet
Comment Utility
You go to file and Choose New Project (or New Application) I don't remember which one was it...

Merry Christmas to you too!

-Viktor
--Ivanov
0
 

Author Comment

by:tolvumeistari
Comment Utility
"File - New" and there i choose a form (template in repository) i will use and i choose my project1 and find there my template of form1.

and now all the components on form2 will inherit from form1


0
 
LVL 4

Expert Comment

by:dwwang
Comment Utility
Yes, and what do you really want? if you do not want to inherit from form1, you shouldn't select the template from repository, but simply a form in the "new" page.
0
 
LVL 10

Expert Comment

by:viktornet
Comment Utility
Yes, dwwang is right. If you don't want to inherit anything you just go to the first tab when you click on File->New and choose Form...

I told you what is the best way to make a new application. You go to File->New Application and not File->New

There is a difference between these two, isn't it??

New Application  //Choose this one...
File->New            //Not this one,,,

-Viktor
--Ivanov
0
 

Author Comment

by:tolvumeistari
Comment Utility
Sorry i have to explain this better..... I have form with full of components and i will do copy of the form so i get all the component of the form1 so i haven't to put the same component after an after  is this good explain?
0
 
LVL 10

Expert Comment

by:viktornet
Comment Utility
You mean you want to have the same components but not inherit it?? i'm perplexed.. would you explain everything at once and say what you want??

There are three radio buttons at the bottom...it says o New  o Copy o Inherit...  Select whichever one you need...
0
 

Author Comment

by:tolvumeistari
Comment Utility
Ì just want to stop this inherit when i make new form from the form1 template
( can i delete the e.g on mouseclick event for lets say button "inherited") can i delete it?
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 10

Expert Comment

by:viktornet
Comment Utility
sorry,,,i'm not sure what you need..maybe someone else would help u with this one...
 Just try removing the check from the radio button at the bottom.that says Inherit and change it to copy or something\..
0
 
LVL 4

Expert Comment

by:dwwang
Comment Utility
Yes, you can, just simply delete the line "inherited" in the event, and write other codes in the body of that event.

However, if you need do nothing in the OnClick event, you should write some dummy code that takes no effects, since the "intelligence" of the Delphi editor won't let you leave a blank event.

So you needn't stop the inheritance, it's a good method that the size of the source code is significantly decreased.
0
 

Author Comment

by:tolvumeistari
Comment Utility
Thanks Victor....for your answer

but Dwwang have the answer the points go to dwwang

thanks.....
0
 

Author Comment

by:tolvumeistari
Comment Utility
Thanks Victor....for your answer

but Dwwang have the answer the points go to dwwang

thanks.....
0
 
LVL 4

Accepted Solution

by:
dwwang earned 50 total points
Comment Utility
Glad that I can help.

Merry Christmas to all!

Wang
0
 
LVL 4

Expert Comment

by:dwwang
Comment Utility
Hi
0
 

Author Comment

by:tolvumeistari
Comment Utility
Thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now