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.

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?

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.


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition