예제 #1
0
        // Hàm add checkbox vào form
        private void AddCheckbox(XtraForm mainform, XtraForm form)
        {
            int w = form.Width;
            int h = form.Height;
            form.Size = new System.Drawing.Size(w, h + 30);
            form.SuspendLayout();

            // Khởi tạo checkbox for add
            DevExpress.XtraEditors.CheckEdit checkEdit1 = new DevExpress.XtraEditors.CheckEdit();
            checkEdit1.Location = new System.Drawing.Point(13, h - 30);//subheader
            checkEdit1.Name = "_" + form.GetType().FullName;
            checkEdit1.Properties.Caption = "Hiện màn hình này ở các lần sau.";
            checkEdit1.Size = new System.Drawing.Size(w, 19);
            checkEdit1.TabIndex = 4;
            checkEdit1.Checked = true;
            checkEdit1.Click += new System.EventHandler(Checkbox_Click);
            form.Controls.Add(checkEdit1);

            form.ResumeLayout(false);
            form.PerformLayout();
        }