Skip to content

Instantly share code, notes, and snippets.

@JohnPeel
Created September 28, 2013 12:19
Show Gist options
  • Save JohnPeel/6741518 to your computer and use it in GitHub Desktop.
Save JohnPeel/6741518 to your computer and use it in GitHub Desktop.
Example of a form in Lape.
program new;
procedure OnClick(Sender: TObject); native;
begin
TForm(Sender).setCaption('Test 2');
end;
procedure ShowForm(); native;
var
_Form: TForm;
_Edit: TEdit;
begin
_Form.Init(nil);
_Form.setCaption('Test');
_Form.setOnClick(OnClick);
_Edit.Init(_Form);
_Edit.setParent(_Form);
_Edit.setTop(50);
_Edit.setLeft(50);
_Form.ShowModal();
_Form.Free();
end;
begin
Sync(ShowForm);
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment