- private void button1_Click(object sender, EventArgs e)
- {
- //sets the focus to the control
- textControl1.Focus();
- //makes control characters visible
- textControl1.ControlChars = true;
- //enters a control character into the Text Control
- textControl1.Text = "\r\n";
-
- textControl1.Selection.Start = 1;
- textControl1.Tables.Add(1, 3,100);
-
- textControl1.Selection.Start = 1;
- //creates TextChar at the first position which is the control character
- TXTextControl.TextChar controlChar = textControl1.TextChars[textControl1.Selection.Start];
- //removes the control character
- textControl1.TextChars.Remove(controlChar);
- }
复制代码 |