To create a label component on the fly, create a new project with one form. On that form place a button and double-click on it to edit the click event handler. Write the following code: procedure TForm1.Button1Click(Sender: TObject); var aLabel: TLabel; begin aLabel := TLabel.Create(self); aLabel.Parent := self; aLabel.Visible := True; aLabel.Caption := 'Created dynamically!'; aLabel.Top := 10; aLabel.Left := 10; end;
Attributes | Values |
---|---|
rdfs:label |
|
rdfs:comment |
|
dcterms:subject | |
abstract |
|