OnClick Demo is the perfect tool for anyone looking to build a demo that handles an OnClick event. It is a cross-platform application built in Delphi using a single code base and single UI for Android, iOS, macOS, Windows development, and Linux. OnClick Demo makes it easy to create a demo that is both professional and engaging. It also allows you to customize your demo to fit your specific needs.
Download the full cross-platform Hello World source code on Github.
This demo is part of over 100 cross-platform demos with everything from camera demos to emoji demos and painting demos.
Table of Contents
What is an OnClick event in software development?
In software development, an OnClick event is a user interface element that allows the user to trigger an action by clicking on it. OnClick events are typically used for buttons or links, and can be programmed to execute any number of actions, including opening a new window, submit a form, or play a sound. In addition to being triggered by the user, OnClick events can also be triggered by software code. For example, an OnClick event may be programmed to execute when a certain condition is met, such as when a button is clicked or a timer expires. Programming OnClick events is a fundamental part of software development, and can be used to create highly interactive applications.
Screenshot
What does the sample code look like?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
unit Unit1; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Edit, FMX.Effects, FMX.Controls.Presentation; type TForm1 = class(TForm) ToolBar1: TToolBar; Label1: TLabel; ShadowEffect4: TShadowEffect; MaterialOxfordBlueSB: TStyleBook; Edit1: TEdit; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.fmx} procedure TForm1.Button1Click(Sender: TObject); begin Label1.Text := Edit1.Text; end; end. |
Ready to learn how to program cross-platform apps like this?
Sign up for the Coding Boot Camp 2022 to learn to program. Topics include: Games, JavaScript, Web, Python, SQL, Databases, iOS, MacOS, Android, Mobile, Linux, Windows, Desktop, Server, and Arduino.
Design. Code. Compile. Deploy.
Start Free TrialUpgrade Today
Free Delphi Community EditionFree C++Builder Community Edition