Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Component changing

Status
Not open for further replies.

cyberant

Programmer
Sep 21, 2003
44
ZA
Hi All

If I have a component, lets say a text component on my form, but now I want that text component to rather be devexpress component that I have. Is there a quick way to do this without having to delete the component and replace it with the new one, thus losing all my attributes for the original component.

Thanks in advance!!
 
Before trying this, BACKUP your files first!

1. Display the form you want to change.
2. Press Alt-F12. This will bring up the text version of the dfm.
3. Search and Replace to change the components - for example, change TEdit to TDBEdit.
4. Press Alt-F12 again. You will probably get several messages about properties that are either missing or no longer valid.
5. Edit the .pas file and make the same changes you made in step 3.

I've successfully used this process many times when moving from the BDE components to Direct Oracle Access (DOA) components - it can be a bit tedious, but it's better than the alternative.

-D
 
If you install GExperts, it has a change component function. GExperts is free, and very useful.

Brian
"There are 2 kinds of people in the world, those that divide people into two groups and those that don't. I belong to the second group." - tag line I stole
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top