In this article, i will introduce you the Delphi development environment and teach you how to work with it.
In these tutorials, i'll be using Borland Delphi version 7. Newer versions differ in their interface, but can also be adjusted to look like older versions.
Go ahead and open your Delphi. The first thing you will see, will probably be this:
This is a basic layout that you see everytime a new project is created. Let me explain the numbered parts of this image.
1. This is the most important element of every program - a form (or a window). This is a place where every element of your program's design lives.
2. In this horizontal palette, the components are listed. In Delphi, every application consists of components. These are visual (like buttons, text fields, even forms) and non-visual (like TCP/IP connections etc.). In this panel you see lots of components, created by Borland and ready for you to use. Later you can find and install even more components and they all will appear on this very component palette.
3. This is a property inspector. When you put a component on a form (go ahead, select a TButton in components palette and click on a form to place it) and select it (single click the component), property inspector displays its properties that can be modified. The property inspector consists of two tabs:
Properties and
Events.
Properties are used to specify simple component options (like width, height, caption etc.) and
Events are used to specify actions, that are executed when something happens (like a button is clicked). If you select the button and change its
Caption to "Click me", you will notice that the title of the button has changed. We will talk about the
Events page later in other tutorials.
4. This is a quicker way to find a component of your form. All components are listed in hierarchical order and you can find them in this window.
5. This is where the actual coding takes place. To go to this window, select a form and press
F12 on your keybord. This will bring the editor to front. To return to the form, press
F12 again. You can also do the same by positioning these two windows with your mouse and clicking on the one you need, but sometimes they completely overlap each other and it's easier to just press
F12.
That is basically enough to know about the environment, so let's go ahead and continue learning Delphi by getting to know what a project is and how to work with it.
Click here for the part 2 of the introduction