Hi,
How do I create an object dynamically? I tried this (and lots of variations on it) but it doesn't show the CheckBox:
procedure TAndroidModule1.AndroidModule1Create(Sender: TObject);
begin
ajCheckBox:=jCheckBox.Create(Self);
ajCheckBox.Parent:=Self;
ajCheckBox.PosRelativeToParent:=[];
ajCheckBox.Anchor:=CheckBox1;
ajCheckBox.Text:= 'Hello World!';
ajCheckBox.PosRelativeToAnchor:=[raBelow];
ajCheckBox.LayoutParamHeight:=lpWrapContent;
ajCheckBox.LayoutParamWidth:=lpWrapContent;
ajCheckBox.Init;
end;
On this forum I also found ajCheckBox.Init(gApp) but that does not work because gApp is apparently not recognized.
Peter