Hello everyone, I came across this article on
How to write a Lazarus component? I was wondering if it is possible to do this through code.
Can we write a Lazarus component using nothing but pascal code?
Does anyone have a simple beginners example of code that shows how to do this?
I was thinking if I use the code below as a boiler-plate and write it out to a disk file that should work yes? Or am I insane?
unit CustomControl1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
TCustomControl1 = class(TComboBox)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Standard', [TCustomControl1]);
end;
end.
Thank you.
Aruna