Home>>Programming>>C++Builder>> » How to Use the Object Repository to Share Items in C++Builder Projects

How to Use the Object Repository to Share Items in C++Builder Projects

Last Updated on September 12, 2018 By hcyaobin

Using the Object Repository

The Object Repository (Tools|Repository) makes it easy share forms, dialog boxes, frames, and data modules. It also provides templates for new projects and wizards that guide the user through the creation of forms and projects. The repository is maintained in BCB.DRO (by default in the BIN directory), a text file that contains references to the items that appear in the Repository and New Items dialogs.

Sharing items within a project

You can share items within a project without adding them to the Object Repository. When you open the New Items dialog box (File|New|Other), you’ll see a page tab with the name of the current project. This page lists all the forms, dialog boxes, and data modules in the project. You can derive a new item from an existing item and customize it as needed.

Adding items to the Object Repository

You can add your own projects, forms, frames, and data modules to those already available in the Object Repository. To add an item to the Object Repository,

  1. If the item is a project or is in a project, open the project.
  2. For a project, choose Project|Add To Repository. For a form or data module, right-click the item and choose Add To Repository.
  3. Type a description, title, and author.
  4. Decide which page you want the item to appear on in the New Items dialog box, then type the name of the page or select it from the Page combo box. If you type the name of a page that doesn’t exist, C++Builder creates a new page.
  5. Choose Browse to select an icon to represent the object in the Object Repository.
  6. Choose OK.

Add a Comment

Your email address will not be published. Required fields are marked *