Learn Delphi Programming | Unit 8.5 | Code Shortcuts and Assistance In Delphi

preview_player
Показать описание

-- Download some video lessons for FREE
-- Download some Delphi project files used in tutorials for FREE
-- Download some PDF lesson instructions for FREE
-- Participate in chats and discussions
-- Get Early access to new tutorials
-- No need to signup and no obligation
PS: SORT VIDEOS FROM EARLIEST TO LATEST TO START AT THE BEGINNING

----------------------------------------
Delphi Tutorial - Unit 8.5 - Code Shortcuts and Assistance In Delphi:

In the previous few tutorials, we learned how to write code for the events of a Delphi object. In this tutorial, we learn how to use some of Delphi’s design time features to help us while writing code in the Code Editor.

You will see how Delphi helps you to remember the names of your objects and how all the properties and methods belonging to those objects are presented to you while typing your code.

We also learn how use short-cuts and keyboard keys to auto complete the code for us.

This will help us to type much faster and it also makes our code less error prone and free from spelling mistakes. This is made possible by forcing us to only use strictly defined names.

We replace the current statement in the Display button’s event handler with three new statements to learn and practise the lessons in this tutorial.

While typing this code the video is paused to explain the different features available for auto-completion. You learn that programmers may sometimes work on other parts of a project for long periods of time, and when it is time to write code for some objects, they tend to forget the names assigned to those objects.

To overcome this problem, you are shown how to use keyboard keys (Control + Space) in conjunction with your naming convention (prefixes) to obtain a list of objects starting with the prefix you typed. The information provided by these lists provide programmers with a vast amount of information, such as names, data types, required parameters, etc.

After programming the new statements in our event handler for the click event of the Display button must be as follows:

begin
redOutput.Color := clYellow;
frmContact.Caption := 'Displaying Contact Information';
redOutput.Lines.Add('Displaying Contact Information');
end;

This code changes the colour of our TRichEdit (named redOutput) to yellow, sets the Caption of our Form (named frmContact) to the phrase “Displaying Contact Information”, and adds a new line to the TRichEdit’s (named redOutput) Lines collection.

PS. Please, help us to keep these Delphi tutorials FREE. Keep our sponsors happy and click the LIKE button. Also SHARE these Delphi tutorials with your friends and encourage them to also SUBSCRIBE. Participate in discussions, ask questions and tell us about your experience in the COMMENTS section of a Delphi tutorial.

This tutorial (Delphi Programming Tutorial - Unit 8.5 - Code Shortcuts and Assistance In Delphi) is best viewed in HD. To change your settings to HD:

1. Click on the gear-icon (Settings) at the bottom of the YouTube Video Player.

2. Select "720p HD" and wait a few moments for the setting to take effect.

Enjoy!

You may also want to visit the following resources for more information:

Рекомендации по теме
Комментарии
Автор

I agree with others, you explain so well! Great job!

nikolamilosevic
Автор

Thanks so much for the tutorials. I'm learning so much from you :)

keenanpillay
Автор

Thanks so much it is really god .
I want information about Bluetooth code in delphi if possible

ahmadwafa
Автор

não entendi... Parece que falou Inglês...

manoeljunior