Delphi 7 :: Re-install a single Delphi 7 component after modified

Dear Experts,

If one has modified a Delphi 7 component's source and would like to update this component on the pallette by re-installing, how should one go about doing this?

The component I want to reinstall is the TDBGrid.

Please advise.
Marius0188Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
MerijnBConnect With a Mentor Sr. Software EngineerCommented:
actually,

my advice is to not make changes to the VCL.

If you need to, inherit a new object from TCustomDBGrid.
0
 
MerijnBSr. Software EngineerCommented:
what do you mean "update this component on the pallette"

Reinstalling this single component is not that easy I think. Maybe we can achieve what you want another way.
0
 
Marius0188Author Commented:
Ok, basically.
Let say I have added a new event or property for TDBGrid.

Now when dropping this component the changes does not appear.
Need to either uninstall and re-install or what else.....?

Give me some advise, please. :)
0
 
developmentguruConnect With a Mentor PresidentCommented:
 MerijnB said it correctly.  Do not make changes to the VCL.  While the TDBGrid is a very useful component, most of us have had to make changes to it.  Generally the best way to do that is to copy the source for the base part you need to change to a new source file and create your own component based on it.  Then you can feel free to make all the changes you need.

  In order to do that for the DBGrid you would need to copy the DBGrids Unit.  You would need to remove the source for any classes you do not intend to change and then make your changes including the name of the class.  This will give you your own set of source that will not change in updated VCL versions.

  Normally yoou would create a package to house your components.  Right click on the package in the project manager and select INSTALL to update it in the IDE.

Let me know if you need more.

0
All Courses

From novice to tech pro — start learning today.