找回密码
 立即注册

QQ登录

只需一步,快速开始

wanhan25

新手上路

1

主题

3

帖子

33

积分

新手上路

积分
33
  • 30

    金币

  • 主题

  • 帖子

最新发帖

[已处理] TxControl表格问题

wanhan25
新手上路   /  发表于:2012-5-16 17:19  /   查看:5239  /  回复:3
你好:请问TxControl插入的表格怎么是灰色的,保存成WORD文件后,用标准WORD打开发现还是灰的,但我用WORD软件插入的表格是黑色的,打印预览可以看见表格,而用TxControl做的,预览时表格没有,数据有。我用的是TxControl标准版17,是否是版本的问题还是其它的,请指点一下,谢谢!

3 个回复

倒序浏览
iceman
社区贡献组   /  发表于:2012-5-16 17:53:00
沙发

回复 1# wanhan25 的帖子

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

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

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

  3.             foreach (TXTextControl.TableRow item in table.Rows)
  4.             {
  5.                 item.CellFormat.LeftBorderColor = Color.Black;
  6.                 item.CellFormat.TopBorderColor = Color.Black;
  7.                 item.CellFormat.RightBorderColor = Color.Black;
  8.                 item.CellFormat.BottomBorderColor = Color.Black;

  9.                 item.CellFormat.BottomBorderWidth = 1;
  10.                 item.CellFormat.LeftBorderWidth = 1;
  11.                 item.CellFormat.RightBorderWidth = 1;
  12.                 item.CellFormat.TopBorderWidth = 1;
  13.             }
复制代码
回复 使用道具 举报
wanhan25
新手上路   /  发表于:2012-5-17 22:01:00
板凳
谢谢,我试验了一下,成功。
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2012-5-18 08:43:00
地板

回复 3# wanhan25 的帖子

:share:
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部