Home VCL Poems TButton

begin  // VCL
	var myButton := TButton.Create(Application);
	myButton.Parent := MainForm;
	myButton.Caption := 'I am TButton';
	myButton.Align := TAlign.alTop;
	myButton.Height := 100;
	myButton.Margins.SetBounds(20,20,20,20);
	myButton.AlignWithMargins := True;
end;
Dynamically created TButton on form (Delphi Programming | Object Pascal Programming)
In Delphi's realm of code and art,
The TButton plays a vital part.
A click, a press, an action made,
A function called, a task conveyed.

With properties to change its face,
Its color, font, and size in place.
It stands there waiting on the form,
For user input to perform.

A simple tool, yet oh so grand,
A building block at programmer's hand.
The TButton, a trusty friend,
On which we oftentimes depend.

So here's to you, dear TButton,
A component true and never sudden.
In Delphi's world of code and might,
You help us bring our dreams to light.
Scroll to Top