Sign in Join
Wiki copytemporary

Lazarus for education

Overview

The standard Lazarus IDE is setup for professional developers. This page describes how to setup the IDE for courses and beginners.

Since 0.9.29 lazarus comes with a package EducationLaz which adds some extra option pages to the IDE helping teachers to setup Lazarus for students and pupils.

Installing the package EducationLaz

Configuring the IDE

On the Environment / Options ... / Education / General page you can turn the education mode on and off.

Component names

When dropping components on a form, the IDE gives default names (Button1, Button2, ...). This is very useful for rapid design and testing but it does not help beginners to create readable code. There is an option to show a naming dialog under Environment / Options .. / Environment / Form Editor / Misc / Focus name on create.

Component palette

If you teach basic programming, then the component palette is only distracting for the students. You can hide any or all components on Environment / Options ... / Education / Component palette.

New files with name

When creating a new unit or a new form the IDE gives a standard name and the file is virtual. This is very useful for experts working with several projects and package at the same time, but it is confusing for beginners. The IDE can show immediately a save dialog. The option for this is Environment / Options ... / Environment / Naming / Ask for file name on new file.

Hiding menu items

The package EducationLaz provides an option page where every IDE menu item can be hidden. The IDE menus are registered in a tree like structure. You can hide single items or whole categories. There is one safety exception: You can not hide the Environment menu.

Single file programs

The concept of projects is too complex for beginners. Beginners starts with simple programs, that consists of only one file. The package EducationLaz adds a new menu item and a new speed button to create single file programs. These mini programs are added to the current project, so the students can instantly start to write programs without handling projects. The programs are built and run with the normal functions (and normal shortcuts Ctrl-F9 and F9) when they are active in the source editor. Internally these mini programs use the IDE feature Run / Configure Build+Run File. You can setup the source in Environment / Options ... / Education / New program.

Code formatting

Beginners have to learn how to write readable code. The IDE auto indenter (auto inserting spaces at the beginning of lines) normally mimics the indentation from the surrounding code. You can setup the indenter to copy the indentation only from the example file and you can edit the example file to whatever indentation rules you prefer. Setup the options under Environment / Options ... / Codetools / General / Indentation.

Helpful IDE features

Some features are especially useful for beginners.

Done

ToDos

Further ideas from non lazarus developers


From the Free Pascal wiki, page "Lazarus for education", as it stood on 2014-02-17 after a change by Jwdietrich, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.