Use Unit

From Appmethod Topics
Jump to: navigation, search

Go Up to File Menu


File > Use Unit (Alt+F11)

Use this popup window to make the contents of a unit available to the current unit. This popup lists all units in the project that are not currently used or included by the current unit. You can only use units that are part of the current project.

You can specify that the unit you are adding is to be included in:

  • The uses subsection of the interface or implementation section (Object Pascal)
  • The #include list of the header or implementation file (C++)

The Use Unit popup window does not add a unit to your project; it inserts a reference (to another unit in the project) into the unit currently active in the Code Editor.

Item Description

Search Glass
Search

Type in all or part of the name of the unit you want to reference. The filtered edit box filters the names of available units based on that text, and the window displays only the matching units in the list.

<list of available units>

Lists all the available units until you start typing in the search field. After that, lists only the units that match the search string you type.

Add to

Determines where to add the reference to the unit that you select from the list:

Item Description

Interface (Object Pascal)

Header (C++)

Includes the unit in:

  • The uses subsection of the interface section (Object Pascal)
  • The #include list of the header file (C++)

Implementation (Object Pascal)

Source (C++)

Includes the unit in:

  • The uses subsection of the implementation section (Object Pascal)
  • The #include list of the implementation file (C++)

See Also