flagControlForSave

flagControlForSave(ctl: Control);

When the flagControlForSave method of the Form class is invoked and passed a control that was not painted on the form using Painter functionality, it flags the control specified in the ctl parameter as one that is saved by Painter when the form is saved.

Any controls that were not painted on the form by using Painter and are not flagged for saving by specifying them in the ctl parameter of this method are not saved when the form is saved.

This method is valid only in Painter. If this method is invoked when the form is not open in Painter, an exception is raised. To check that the form is open, use the isInPainter method of the Control class, which returns true if the control is open in Painter.

If the length of the name of the control is greater than 16 characters, an exception 1035 (String too long) is raised.

This process becomes necessary, for example, when a user-defined control adds additional controls to a form using the addControl method of the Form class as part of its creation process.

If the flagControlForSave method is not invoked for these additional controls when a form on which the user-defined control has been painted is saved, only the user-defined control is saved with the form, and not the additional controls.