ValidParentForm function
Gets a valid parent form for the specified control.
Declaration
function ValidParentForm(Control: TControl; TopForm: Boolean=True)
: TCustomFormDescription
ValidParentForm is a
TCustomForm function used to get a
valid parent form for the control specified in the
Control
argument.
TopForm indicates if the return value should contain the
absolute root ancestor in the ancestry tree. ValidParentForm calls
GetParentForm to get the return value for the routine.
ValidParentForm raises an EInvalidOperation exception with the
message in sParentRequired when a valid parent form is not found
for the specified control.
Errors
Raises an EInvalidOperation exception with the message in sParentRequired when a valid parent form is not found for the specified control.
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
