How do I display both header and source file in Borland Builder XE?

2.2k views Asked by At

Does someone know how to display both the header and source file at once in the builder XE?

I know I can toggle between them, but I'd rather have a tab for each file.

Thanks

3

There are 3 answers

2
Remy Lebeau On BEST ANSWER

By design, the IDE should not be displaying the files side by side at the same time. Related files (such as .cpp, .h, and .dfm for a given Unit) are displayed as a group, where there is only 1 tab up top for the group, and separate tabs down below for the individual files of the group.

Code Editor

If you are able to display the individual files side by side with their own top-level tabs, then the files are likely not being grouped together correctly, such as if the file names do not match each other, or the header file guard in the .h file is named incorrectly.

1
auburg On

Try going to View->New Edit Window

2
EBlake On

Further to the answer posted by Remy Lebeau, the "magic" form for the header file guard is <filename>H. For example, the source file pair Foo.cpp/Foo.h requires that the define be FooH in Foo.h.

For new forms, RAD Studio will take care of this naming for you, but for non-visual file units, you may need to make these changes manually. You may even need to edit the .cbprof file to add the <DependentOn>Foo.h</DependentOn> to the <CppCompile Include="Foo.cpp"> tag.