Use Unit

From RAD Studio
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 (Delphi)
  • 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 (Delphi)

Header (C++)

Includes the unit in:

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

Implementation (Delphi)

Source (C++)

Includes the unit in:

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

See Also