Click here to Skip to main content
15,891,706 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All

New to Delphi, come from Visual Studio and .NET background.

In .NET, you can draw components in the IDE and set properties. You can then see the Windows Designer generated code.

In Delphi IDE, you can draw components in the IDE. Is there a way to see the code which sets the properties of the components? I am studying a third-party component and would like to see how the properties are set.
Posted

What do you mean "see"? If you got your third-party component with source code, which is highly desirable, you see everything, if not — you don't see any source code. With .NET, you see all generated code in C# or VB.NET only for System.Windows.Forms. WPF is different: part of the code is XAML, and the code-behind code is generated during build on temporary basis and is not a part of the source code. It's good, you still can see it, just to learn how it works. In real life, a developer don't look at this code; it is deleted with other temporary files when code is submitted to revision control system and the like.

Not quite so in Delphi. Delphi is more like WPF: source code consists of Pascal code and *.DFM files, which can be text or binary. These files are part of the project, source files.

You need to start your acquaintance with programming system with learning what files are part of your source code and what are not and know exactly the purpose of each file type. The Deplhi-specific way is having more in Pascal files, for example, application project files *.DPR are Pascal files.

For reference, look at this:
http://delphi.wikia.com/wiki/Delphi_File_Extensions[^].

Is there anything you're not sure about? If not, you are in trouble: you investment in code base is too valuable and is at risk. Stop doing anything else and learn it.

—SA
 
Share this answer
 
In design time right click on a form and select view code :)

you will see properties in a hierarchy style

and right click again and select view form to see the form again
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900