Linux Format

Write GUI apps in Pascal with Lazarus

LAZARUS

Credit: www.lazarus-ide.org

Creating GUI apps in Linux is more complex than making simple apps that run in a terminal. C There are several ways that are mostly GTK-based with C or C++, such as GTK+/C, Qt/C++, FLTK/C++ and WxWidgets/C++. You can also use the Python library PyGObject.

There is another, easier way if you don’t mind learning Pascal. Install Lazarus (see boxout opposite), an IDE that also installs the cross-platform opensource programming language Free Pascal. This lets you create GUI apps visually by dropping icons on a form, setting their properties, then compiling and running the program.

After installing it, you can start Lazarus with the command startlazarus in a terminal. That opens the Lazarus editor. You should see five different windows:

1. The top one is the main window, with the menu and all components and their icons.

2. To the left is the Object Inspector. This shows the properties for the selected component on the Visual form (see 4).

3. The source editor is where you edit the source code of your Pascal application.

4. The gridded window with the title Form1 is the Visual form.

5. A Messages window at the bottom. This shows the compile results.

GUI applications in Free Pascal are made

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format5 min read
Tips For Managing Docker Containers
Everyone knows how containers revolutionised application building and deployment. Using a E disposable stack of containers that make up an app that aren’t using the docker-compose command to manage the stack are missing a trick. It allows the shippin
Linux Format3 min readSecurity
ParrotOS
A security focused operating system that is well suited to the Raspberry Pi 4 2GB and upwards, but not Pi 5 for now. ParrotOS provides a plethora of security auditing tools for both red and blue team members. This is a great distro for learners and n
Linux Format2 min read
Automatic Tracking
TimeSlotTracker has activity monitoring and this includes an optional facility to take screenshots and T place them in a user-defined directory. However, this isn’t the type of intricate user monitoring that some of the other options offer. Idle dete

Related