Carlos
Carlos

Reputation: 49

How to include a .pas in the Delphi Project?

How can I include a .pas in my project?

This .pas is in the same folder than the other but it does not appear together to the other.

enter image description here

Somebody can help me?

Upvotes: 1

Views: 3834

Answers (3)

mjn
mjn

Reputation: 36644

Tested with XE7:

You can add a .pas file, which is currently open in the editor, by "drag & drop":

  • click on the tab (which shows the file name) of the editor, and hold the mouse key pressed
  • move the mouse cursor, to the project inspector window, until it is over the project name (the cursor will now change its style, to indicate that dropping is possible)
  • release the mouse button

The IDE will now ask if you would like to add the file to the project.

Upvotes: 0

Bruce McGee
Bruce McGee

Reputation: 15334

It isn't enough to just put the units in the same folder. You have to explicitly add the units to your project in order for them to show up in the Project Manager. This will add an entry in your project's .dpr and .dproj files.

Use Shift+F11 to add units.

Upvotes: 2

William
William

Reputation: 497

Go to Project->Add to project (shift + F11) and select the file you want to add on your project, the file you added will be inserted to dpr and then you can see this file on project.

Upvotes: 7

Related Questions