- int id = 1000;
- private void btnInsertTable_Click(object sender, EventArgs e)
- {
- int rowcount, colcount,txtposition;
- rowcount = 2;
- colcount = 3;
- txtposition = this.textControl1.InputPosition.TextPosition;
- this.textControl1.Tables.Add(2, 3, id);
- this.textControl1.Tables.GetItem(id++).Select();
- this.textControl1.TableFormatDialog();
- this.textControl1.Focus();
- this.textControl1.InputPosition = new InputPosition(txtposition + rowcount * colcount + 1);
- }
复制代码 |