iceman 发表于 2015-8-20 18:03:00

回复 10楼UpLin的帖子

这两个值默认为0,如果您需要精准计算可以提前设置其值,代码如下:

      private void addTableToolStripMenuItem_Click(object sender, EventArgs e)
      {
            this.textControl1.Tables.Add(10,10,11);
            TXTextControl.Table tb = this.textControl1.Tables.GetItem(11);
            foreach (TXTextControl.TableCell cell in tb.Cells)
            {
                cell.CellFormat.TopTextDistance = 10;
                cell.CellFormat.BottomTextDistance = 10;
            }

      }

UpLin 发表于 2015-8-24 15:26:00

回复 11楼iceman的帖子

哦 那就是不能获取单元格的精确高度了。 项目需求是 “打开已有的表格,并获取单元格的高度”

Alice 发表于 2015-8-24 17:58:00

回复 12楼UpLin的帖子

很抱歉不能精确满足你的需求。

iceman 发表于 2015-9-1 17:37:00

回复 12楼UpLin的帖子

抱歉让你久等了。
TopTextDistance 、BottomTextDistance 属性默认状态下是0。至于为什么UI上和设置值不同目前还不太清楚。我需要跟厂商沟通下,看是否能给出一个合理的解决方法。

有进一步反馈及时通知你。

iceman 发表于 2015-9-9 12:31:00

回复 10楼UpLin的帖子

UpLin 你好,
cell.CellFormat.BottomTextDistance + cell.CellFormat.TopTextDistance 为 0 时,我们看到的空隙是LineSpace。
你可以通过以下链接了解并设置:
1.http://www.textcontrol.com/en_US/support/documentation/dotnet/n_paragraphformat.absolutelinespacing.htm
2.http://www.textcontrol.com/en_US/support/documentation/dotnet/n_paragraphformat.linespacing.htm

iceman 发表于 2015-9-17 09:11:00

回复 12楼UpLin的帖子

请问问题是否解决?
为了给你提供更优质的服务,请对本次服务进行评分。我们会认真对待你提出的宝贵意见,谢谢
http://gcdn.gcpowertools.com.cn/attachment.aspx?attachmentid=10062
页: 1 [2]
查看完整版本: TableCell单元格的高度