CreateObject() – Objekt erstellen
Die Funktion erzeugt ein Objekt.
|
Parameter |
Beschreibung |
|---|---|
|
aClassName:C |
Klassennamen |
|
aName:C |
Objektname |
|
aOwner:O |
Besitzer-Objekt |
|
aParent:O |
Container-Objekt |
Rückgabewert
Objekt - Erstelltes Objekt
Beispiel
| oForm, oBtnC |
function DoOnBtnCClick(sender)
CloseForm(oForm),
end,
oForm := CreateObject('TForm'),
oForm.BorderStyle := bsSingle,
oForm.Width := 200,
oForm.Height := 100,
oForm.Caption := 'CreateObject-Test',
oForm.Position := poScreenCenter,
oBtnC := CreateObject('TButton', 'BtnC', oForm, oForm),
oBtnC.Width := 150,
oBtnC.Height := 20,
oBtnC.Top := 20,
oBtnC.Left := 20,
AssignEvent(oBtnC, 'OnClick', 'DoOnBtnCClick'),
ShowModal(oForm),
Weitere Verknüpfungen