您好,测试以下代码可以实现功能,请参考
- Table tb = _textControl.Tables.GetItem(0);
- int start=0,length=0;
- foreach (TableCell cell in tb.Cells)
- {
- if (cell.Row == 2 && cell.Column == 2)
- start=cell.Start;
- if (cell.Row == 2 && cell.Column == 4)
- length = cell.Start+cell.Length-start;
- }
- _textControl.Selection = new TXTextControl.Selection(start,length);
复制代码 |