wanhan25 发表于 2012-5-16 17:19:00

TxControl表格问题

你好:请问TxControl插入的表格怎么是灰色的,保存成WORD文件后,用标准WORD打开发现还是灰的,但我用WORD软件插入的表格是黑色的,打印预览可以看见表格,而用TxControl做的,预览时表格没有,数据有。我用的是TxControl标准版17,是否是版本的问题还是其它的,请指点一下,谢谢!

iceman 发表于 2012-5-16 17:53:00

回复 1# wanhan25 的帖子

wanhan25 你好,
请使用以下代码查看效果:

this.textControl1.Tables.Add(10, 10, 11);

            TXTextControl.Table table = this.textControl1.Tables.GetItem(11);

            foreach (TXTextControl.TableRow item in table.Rows)
            {
                item.CellFormat.LeftBorderColor = Color.Black;
                item.CellFormat.TopBorderColor = Color.Black;
                item.CellFormat.RightBorderColor = Color.Black;
                item.CellFormat.BottomBorderColor = Color.Black;

                item.CellFormat.BottomBorderWidth = 1;
                item.CellFormat.LeftBorderWidth = 1;
                item.CellFormat.RightBorderWidth = 1;
                item.CellFormat.TopBorderWidth = 1;
            }

wanhan25 发表于 2012-5-17 22:01:00

谢谢,我试验了一下,成功。

iceman 发表于 2012-5-18 08:43:00

回复 3# wanhan25 的帖子

:share:
页: [1]
查看完整版本: TxControl表格问题