About: Using Delphi to Create Components Dynamically   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

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;

AttributesValues
rdfs:label
  • Using Delphi to Create Components Dynamically
rdfs:comment
  • 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;
dcterms:subject
abstract
  • 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; Run the application and click on the button and you'll see the label created on the fly. You can even put instances of components in an array and manage them in a similar way to VBs Control Arrays.
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software