ComponentOne List for WinForms
C1.Win.C1List Namespace / PrintForm Class / Init Method
Example

In This Topic
    Init Method (PrintForm)
    In This Topic
    Additional initialization of the form.
    Syntax
    'Declaration
     
    
    Protected Overridable Sub Init() 
    protected virtual void Init()
    Remarks
    To override properties like FormBorderStyle, MaximizeBox, MinimizeBox, ControlBox etc. of a Form, inherited from "C1.Win.C1List.PrintForm", override the Init method of the PrintForm. First call the base.Init(), then set the properties you want.
    Example
    The example is a custom PrintForm which has sizable border, control box is on, and minimize and maximize boxes are off.
    public class CustPrintForm : C1.Win.C1List.PrintForm
    {
        public CustPrintForm(): base()
        {
        }
                
        protected override void Init()
        {
            base.Init();
            FormBorderStyle = FormBorderStyle.Sizable;
            this.ControlBox = true;
            this.MinimizeBox = false;
            this.MaximizeBox = false;
        }
    }
    See Also