找回密码
 立即注册

QQ登录

只需一步,快速开始

zhaoyuanxu

中级会员

7

主题

17

帖子

908

积分

中级会员

积分
908

活字格认证

zhaoyuanxu
中级会员   /  发表于:2014-8-6 16:19  /   查看:4999  /  回复:1
使用了动态增加列,所以在打印预览里面只有增加的列没有黑线边框,其他固定的列都有,fpSpread.InsertRows使用这个方法进行动态增加的。请问如何设置,可以在预览中查看增加行的border黑线

1 个回复

倒序浏览
iceman
社区贡献组   /  发表于:2014-8-6 18:02:00
沙发
回复 1楼zhaoyuanxu的帖子

可以通过 SetCellBorder 设置新增行的 Border:

  1. ' Hide the horizontal and vertical grid lines
  2. fpSpread1.GridShowHoriz = False
  3. fpSpread1.GridShowVert = False
  4. ' Set a cell border on the top, bottom,
  5. ' and left side of cell B2
  6. fpSpread1.SetCellBorder 2, 2, 2, 2, 1, &H800000, CellBorderStyleSolid
  7. fpSpread1.SetCellBorder 2, 2, 2, 2, 4, &H800000, CellBorderStyleSolid
  8. fpSpread1.SetCellBorder 2, 2, 2, 2, 8, &H800000, CellBorderStyleSolid
  9. ' Set a cell border on the top, bottom,
  10. ' and right side of cell C2
  11. fpSpread1.SetCellBorder 3, 2, 3, 2, 2, &H800000, CellBorderStyleSolid
  12. fpSpread1.SetCellBorder 3, 2, 3, 2, 4, &H800000, CellBorderStyleSolid
  13. fpSpread1.SetCellBorder 3, 2, 3, 2, 8, &H800000, CellBorderStyleSolid
  14. ' Set the text to overflow to adjacent empty cells
  15. fpSpread1.AllowCellOverflow = True
  16. ' Provide text
  17. fpSpread1.Col = 2
  18. fpSpread1.Row = 2
  19. fpSpread1.Text = "ADZ Racing Supplies"
复制代码

评分

参与人数 1满意度 +5 收起 理由
zhaoyuanxu + 5 sky

查看全部评分

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