void InitializeComponent () { SuspendLayout (); // // dataGrid // dataGrid = new MyDataGrid (); dataGrid.HeaderForeColor = System.Drawing.SystemColors.ControlText; dataGrid.Location = new System.Drawing.Point (10, 10); dataGrid.Name = "dataGrid"; dataGrid.Size = new System.Drawing.Size (500, 500); dataGrid.TableStyles.Add (new MyDataGridTableStyle ()); dataGrid.CurrentCellChanged += current_cell_changed; Button test1 = new Button (); test1.Location = new System.Drawing.Point (430 + 100, 50); test1.Text = "Edit cell [1,1]"; test1.Size = new Size (100, 30); test1.Click += new System.EventHandler (test1_clicked); Controls.Add (test1); Button test2 = new Button (); test2.Location = new System.Drawing.Point (430 + 220, 50); test2.Text = "Set Current"; test2.Size = new Size (100, 30); test2.Click += new System.EventHandler (test2_clicked); Controls.Add (test2); // // MainForm // Text = "SWF-Datagrid Styles"; ClientSize = new System.Drawing.Size (850, 650); Controls.Add(dataGrid); Load += new System.EventHandler(MainFormLoad); ResumeLayout (false); }