Getting Started with Form-based Applications in Lazarus

Introduction

The following topics will help you to use Lazarus to write simple form-based applications using buttons, edit boxes, labels and labelled edits. You will learn about the essential code and files that comprise an application and how to create an application from existing unit and form files. You can then follow our tutorial on form-based applications to learn how to use further components such as the string grid, DBGrid, DBEdit, DBMemo, timer, dialogue boxes and the form's canvas.

In the instructions we will give the key combinations for actions where possible. This table shows ways of firing commonly used actions in the order they appear in the Lazarus menu structure.

Menu Action Button (showing tool-tip) Short-cut Key(s)
File > Open ... Open file Open file Ctrl+O
File > Save All Save all files   Shift+Ctrl+S
View > Object Inspector Show Object Inspector   F11
View > Units ... Open View project units dialogue View units Ctrl+F12
View > Forms... Open View project forms dialogue View forms Shift+F12
View > Toggle form/unit view Swap view of form/unit Toggle Form/Unit F12
Project > New Project ... Open Create a new project dialogue    
Project > Add editor file to Project Add file showing in editor to project   Shift+F11
Run > Run Run program
Run
F9

For the screenshots in the following topics we have dragged the dialogue boxes to convenient sizes, so do not expect yours to look exactly the same.

Click on the first topic title below, to continue:

Programming - a skill for life!

Getting Started, Links and other resources