vb中spread打印时预览没有黑线
使用了动态增加列,所以在打印预览里面只有增加的列没有黑线边框,其他固定的列都有,fpSpread.InsertRows使用这个方法进行动态增加的。请问如何设置,可以在预览中查看增加行的border黑线 回复 1楼zhaoyuanxu的帖子可以通过 SetCellBorder 设置新增行的 Border:
' Hide the horizontal and vertical grid lines
fpSpread1.GridShowHoriz = False
fpSpread1.GridShowVert = False
' Set a cell border on the top, bottom,
' and left side of cell B2
fpSpread1.SetCellBorder 2, 2, 2, 2, 1, &H800000, CellBorderStyleSolid
fpSpread1.SetCellBorder 2, 2, 2, 2, 4, &H800000, CellBorderStyleSolid
fpSpread1.SetCellBorder 2, 2, 2, 2, 8, &H800000, CellBorderStyleSolid
' Set a cell border on the top, bottom,
' and right side of cell C2
fpSpread1.SetCellBorder 3, 2, 3, 2, 2, &H800000, CellBorderStyleSolid
fpSpread1.SetCellBorder 3, 2, 3, 2, 4, &H800000, CellBorderStyleSolid
fpSpread1.SetCellBorder 3, 2, 3, 2, 8, &H800000, CellBorderStyleSolid
' Set the text to overflow to adjacent empty cells
fpSpread1.AllowCellOverflow = True
' Provide text
fpSpread1.Col = 2
fpSpread1.Row = 2
fpSpread1.Text = "ADZ Racing Supplies"
页:
[1]