Foxtable(狐表)用户栏目专家坐堂 → [求助]插入行


  共有2189人关注过本帖树形打印复制链接

主题:[求助]插入行

帅哥哟,离线,有人找我吗?
WUZHAN
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小狐 帖子:373 积分:2732 威望:0 精华:0 注册:2012/2/17 20:05:00
  发帖心情 Post By:2015/7/28 18:49:00 [显示全部帖子]

插入行和列

Rows和Cols都有一个Insert方法,用于在指定位置插入行或列。

示例:

Dim doc As New PrintDoc
Dim
rt As New prt.RenderTable()
doc.Body.Children.Add(rt)
rt.Style.GridLines.All = New prt.LineDef
rt.Width =
100
rt.Height =
100
rt.Rows.Count =
3 '设置行数为3行
rt.Cols.Count =
3 '设置列数为3列
rt.Rows.Insert(
1) '在第2行位置插入一行
rt.Cols.Insert(
2) '在第3列位置插入一列
rt.Cells(
1,0).Text = "插入的行"
rt.Cells(
0,2).Text = "插入的列"
rt.Style.Font = New Font(
"宋体", 14, FontStyle.Bold)
rt.Style.TextAlignVert = prt.AlignHorzEnum.Center
rt.Style.TextAlignHorz = prt.AlignHorzEnum.Center
rt.Rows(
1).Style.Borders.All = New prt.LineDef("1mm", Color.Red)
rt.Cols(
2).Style.Borders.All = New prt.LineDef("1mm", Color.Blue)
Doc.Preview()


 回到顶部