SendToBack()
SendToBack() – Control in den Hintergrund schicken
Die Funktion schickt ein Objekt in den Hintergrund, d.h. die Z-Order des Controls wird verringert.
Parameter | Beschreibung |
---|---|
aControl:O | Control-Objekt |
Rückgabewert
keiner
Beispiel
CODE
| oForm, oBtnFront, oBtnBack, oLabel, oMemo |
function DoHide()
SendToBack(oBtnBack),
end,
function DoShow()
BringToFront(oBtnBack),
end,
oForm := CreateObject('TForm'),
oForm.BorderStyle := bsSingle,
oForm.Width := 366,
oForm.Height := 120,
oForm.Caption := 'SendToBack() und BringToFront()',
oForm.Position := poScreenCenter,
oBtnFront := CreateObject('TButton', 'BtnShow', oForm, oForm),
oBtnFront.Width := 150,
oBtnFront.Height := 20,
oBtnFront.Top := 10,
oBtnFront.Left := 10,
oBtnBack := CreateObject('TButton', 'BtnHide', oForm, oForm),
oBtnBack.Width := 150,
oBtnBack.Height := 20,
oBtnBack.Top := 10,
oBtnBack.Left := 190,
oMemo := CreateObject('TMemo', 'Memo', oForm, oForm),
oMemo.Width := 160,
oMemo.Height := 30,
oMemo.Top := 5,
oMemo.Left := 185,
SendtoBack(oMemo),
AssignEvent(oBtnFront, 'OnClick', 'DoShow'),
AssignEvent(oBtnBack, 'OnClick', 'DoHide'),
ShowModal(oForm),