-
- Start Delphi and select Component | Install Component...
- This will invoke the "Install Component" dialog.
- In the "Unit File Name" edit box enter the name of the unit you want to install.
- If the unit is in the Search Path, a full path name is not required. If the unit directory is not in the Search Path, it will be added to the end.
- The "Search Path" edit box displays the path used by Delphi to search for files. Leave this as it is.
- Use the "Package file name" drop-down list to select the name of an installed package.
- Click on OK.
- Delphi will prompt you whether you want to rebuild the modified package or not.
- Click on Yes.
- After the package is compiled, Delphi will show you a message saying that the new TSomeComponent component was registered and already available as part of the VCL.
- Close the package detail window, allowing Delphi to save the changes to it.
- The component is now available in the components palette.
- Drop the component on a form, and simply: use it.
-
- In step 3, you can click on the Browse button to browse for the component (unit)
- In step 6, default package is "Borland User Components", there is no special need to alter this.
本文详细介绍了如何在Delphi中安装自定义组件的过程。通过设置单元文件名、浏览选择组件、选择包文件等步骤,可以将新组件添加到Delphi的组件调色板中,并在表单上使用。
1353

被折叠的 条评论
为什么被折叠?



