Skip to main content
Skip table of contents

GetParentForm()

GetParentForm() – Parent eines Controls ermitteln

Die Funktion gibt das Formular des Controls zurück, das der Parent von aControl ist.

Parameter

Beschreibung

aControl:O

Control-Objekt

Rückgabewert


Objekt - Formular

Beispiel

CODE
| oForm, oBtnC, oEdit, oObj |

function DoOnBtnCClick(sender)
   oObj := GetParentForm(oBtnC),
   Meld(oObj.Name),
end,

oForm             := CreateObject('TForm'),
oForm.BorderStyle := bsSingle,
oForm.Width       := 200,
oForm.Height      := 400,
oForm.Name        := 'Form',
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,

oEdit      := CreateObject('TBeEdit', 'Edit', oForm, oForm),
oEdit.Top  := 100,
oEdit.Left := 20,
oEdit.Text := 'Hello World',

AssignEvent(oBtnC, 'OnClick', 'DoOnBtnCClick'),
ShowModal(oForm),

Weitere Verknüpfungen


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.