canHaveAsChild

canHaveAsChild(proposedChild:   Control;
               rejectionReason: String output): Boolean;

The canHaveAsChild method of the Control class is used by the Painter to determine whether the control specified in the proposedChild parameter can be placed on the control. If this method returns false, a message can be returned in the rejectionReason parameter.

This message is displayed on the status line of the JADE Painter when dragging an existing control or trying to create a new control on top of a control that does not support this dragged or new control; for example, it controls the fact that a Folder control can have only Sheet controls as children.

At the Control class level, this method always returns the same as the canControlHaveChildren method. It is reimplemented in the Folder class to ensure that only sheets are placed only on folders.