合并表格(Table)单元格
来源:互联网 发布:淘宝购物返利那个高 编辑:程序博客网 时间:2024/04/30 02:24
Imports ZwSoft.ZwCAD.Runtime
Imports ZwSoft.ZwCAD.ApplicationServices
Imports ZwSoft.ZwCAD.DatabaseServices
Imports ZwSoft.ZwCAD.EditorInput
Public Class Class1
<CommandMethod("MergeCells")> _
Public Sub MergeCells()
Dim ZcDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim ZcDB As Database = ZcDoc.Database
Dim ZcEd As Editor = ZcDoc.Editor
Dim peo As New PromptEntityOptions(vbLf & "Select a table to merge!")
peo.SetRejectMessage(vbLf & "Must be a table!")
peo.AddAllowedClass(GetType(Table), True)
Dim per As PromptEntityResult = ZcEd.GetEntity(peo)
If per.Status <> PromptStatus.OK Then
Return
End If
Using ZcTrans As Transaction = ZcDB.TransactionManager.StartTransaction()
Dim tbl As Table = DirectCast(ZcTrans.GetObject(per.ObjectId, OpenMode.ForWrite), Table)
Dim columns As Int16 = tbl.NumColumns
tbl.MergeCells(New TableRegion(0, 0, 0, columns - 1))
ZcTrans.Commit()
End Using
End Sub
End Class
Imports ZwSoft.ZwCAD.ApplicationServices
Imports ZwSoft.ZwCAD.DatabaseServices
Imports ZwSoft.ZwCAD.EditorInput
Public Class Class1
<CommandMethod("MergeCells")> _
Public Sub MergeCells()
Dim ZcDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim ZcDB As Database = ZcDoc.Database
Dim ZcEd As Editor = ZcDoc.Editor
Dim peo As New PromptEntityOptions(vbLf & "Select a table to merge!")
peo.SetRejectMessage(vbLf & "Must be a table!")
peo.AddAllowedClass(GetType(Table), True)
Dim per As PromptEntityResult = ZcEd.GetEntity(peo)
If per.Status <> PromptStatus.OK Then
Return
End If
Using ZcTrans As Transaction = ZcDB.TransactionManager.StartTransaction()
Dim tbl As Table = DirectCast(ZcTrans.GetObject(per.ObjectId, OpenMode.ForWrite), Table)
Dim columns As Int16 = tbl.NumColumns
tbl.MergeCells(New TableRegion(0, 0, 0, columns - 1))
ZcTrans.Commit()
End Using
End Sub
End Class
0 0
- 合并表格(Table)单元格
- table表格--合并单元格
- 12-table表格单元格合并
- table表格表头合并单元格问题
- jquery.table.rowspan.js 表格自动合并单元格插件
- html5中table表格标签中合并单元格
- Table合并单元格,表格居中,内容居中显示
- <学习html>第五天笔记-表格table(创建表格、表格属性、表头标签、表格结构、表格标题标签、合并单元格)
- table合并单元格(Jquery 插件)
- js table 单元格合并
- table合并单元格
- Html Table 合并单元格
- table 合并单元格方法
- table合并单元格
- Table中合并单元格
- table合并单元格
- jquery table合并单元格
- js合并table单元格
- 计步器
- 统计字符串的某一子串在字符串中的出现次数(C语言实现)
- Mybatis学习(4)实现关联数据的查询
- 简述 synchronized 和 java.util.concurrent.locks.Lock 的异同 ?
- HDU 4599 Dice
- 合并表格(Table)单元格
- SVN服务端安装
- centos6.x下让redis以服务方式运行
- 黑马程序员——java概述
- 4Sum
- 欢迎使用CSDN-markdown编辑器
- Oracle数据库之创建表空间与用户
- COM学习笔记1_COM初步探索
- transient关键字