Answer the question
In order to leave comments, you need to log in
How to change the component class?
The program written in Delphi 7 has a panel component. TPanel class. There are many other objects on the panel.
I want to replace this panel with another one, sPanel (Alpha Controls).
Of course, in the program code I refer to only one property - visible. It is on both panels.
Which program modules need to be changed?
I changed in Unit1.pas - type TPanel to sPanel and in Unit1.dfm TPanel to sPanel.
But when opened, it says that the sPanel class was not found, although sPanel is written in uses.
Or is such a replacement impossible and you have to create a new panel yourself, drag all objects and delete the old one?
Answer the question
In order to leave comments, you need to log in
The easiest way. Open DFM (RMB on the form, View as Text) and run Search-Replace.
After that, we make any changes to the module (yes, at least add a space and delete it), and save it. Automation will ask: replace? - we agree.
I changed in Unit1.pas - type TPanel to sPanel and in Unit1.dfm TPanel to sPanel.
But when opened, it says that the sPanel class was not found, although sPanel is written in uses.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question