delphi 设置表格样式。

//设置表格样式
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderLeft).LineStyle = Word.WdLineStyle.wdLineStyleSingle;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderLeft).LineWidth = Word.WdLineWidth.wdLineWidth050pt;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderLeft).Color = Word.WdColor.wdColorAutomatic;

wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderTop).LineStyle = Word.WdLineStyle.wdLineStyleSingle;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderTop).LineWidth = Word.WdLineWidth.wdLineWidth050pt;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderTop).Color = Word.WdColor.wdColorAutomatic;

wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderBottom).LineStyle = Word.WdLineStyle.wdLineStyleSingle;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderBottom).LineWidth = Word.WdLineWidth.wdLineWidth050pt;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderBottom).Color = Word.WdColor.wdColorAutomatic;

wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderHorizontal).LineStyle = Word.WdLineStyle.wdLineStyleSingle;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderHorizontal).LineWidth = Word.WdLineWidth.wdLineWidth050pt;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderHorizontal).Color = Word.WdColor.wdColorAutomatic;

wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderVertical).LineStyle = Word.WdLineStyle.wdLineStyleSingle;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderVertical).LineWidth = Word.WdLineWidth.wdLineWidth050pt;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderVertical).Color = Word.WdColor.wdColorAutomatic;

wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderRight).LineStyle = Word.WdLineStyle.wdLineStyleSingle;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderRight).LineWidth = Word.WdLineWidth.wdLineWidth050pt;
wordDoc.Tables.Item(1).Borders.Item(Word.WdBorderType.wdBorderRight).Color = Word.WdColor.wdColorAutomatic;

// wordDoc.Tables.Item(k).Borders.Item(Word.WdBorderType.wdBorderDiagonalDown).LineStyle = Word.WdLineStyle.wdLineStyleSingle;
// wordDoc.Tables.Item(k).Borders.Item(Word.WdBorderType.wdBorderDiagonalDown).LineWidth = Word.WdLineWidth.wdLineWidth050pt;
// wordDoc.Tables.Item(k).Borders.Item(Word.WdBorderType.wdBorderDiagonalDown).Color = Word.WdColor.wdColorAutomatic;
//第一行显示
wordDoc.Tables.Item(1).Cell(1,2).Merge(wordDoc.Tables.Item(1).Cell(1,3));
wordDoc.Tables.Item(1).Cell(1,4).Merge(wordDoc.Tables.Item(1).Cell(1,5));

时间: 2024-07-29 03:40:28

delphi 设置表格样式。的相关文章

JQuery EasyUI DataGrid根据条件设置表格行样式(背景色)

1.javascript定义函数返回样式 <script type="text/javascript"> //根据条件设置表格行背景颜色 function setRowBgColor(index, row) { if (row.ERROR_INFO != null && row.ERROR_INFO != "") { return 'background-color:yellow;color:black;'; } } </scrip

CSS:表格样式(设置表格边框/文字/背景的样式)

使用CSS可以制作出十分精美的表格. 代码整理自w3school:http://www.w3school.com.cn 效果图: 代码: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <meta http-equiv="

PHPEXCEL 设置被导出的表格样式代码

1.设置表格高度.宽度 代码: $objPHPExcel->getActiveSheet()->getRowDimension('6')->setRowHeight(30);//行高 $objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(15);//列宽 2.合并单元格 代码: $objPHPExcel->getActiveSheet()->mergeCells('A1:P1');

css003 选择器:明确设置哪些样式

css003 选择器:明确设置哪些样式 1.每个样式的两个部分:选择器和声明块 1.标签选择器:整体控制 2.类选择器:精确控制(.+字母.数字.连字符或下划线) Css允许的类名为.+字母.数字.连字符或下划线(最前面的点一定要记得)且点之后的类名必须以字母开头.类名区分大小写. 3.ID选择器:控制特殊的网页元素 4.通用选择器:*{font-size: 18px;} 2.标签 1.祖先标签 2.派生标签:子孙标签 3.父标签:离一个标签最近的祖先标签为父标签(每个标签只有一个父标签) 4.

自己编写jQuery插件 之 表格样式(银光棒)

又来吐嘈了,实在是忍不住:换工作以来的第一次上班迟到.早上坐车,坐了4站路发现路线不对,问司机,司机说从今天起换路线了.尼玛,立马下车换乘.换了车,开了2站路,车子坏了,再次被迫下车.就近站牌等车,第一次车没靠站,直接走了,第二次很挤,没法还得上.终于到了公司楼下,fuck,电梯坏了,最终我迟到了......一个美好的早晨,我就这样被老天爷给轮了! 先上图: 上面这张图有3种状态,默认状态(灰白相间),鼠标悬浮状态(绿色),鼠标点击状态(黄色). Html代码如下: <table> <t

设置表格单双行颜色

<script type="text/javascript"> $(document).ready(function () { $("table").attr("bgColor", "#222222"); //设置表格的背景颜色 $("tr").attr("bgColor", "#3366CC"); //为单数行表格设置背景颜色 $("tr:ev

链接样式和表格样式

链接的特殊性在于能够根据它们所处的状态来设置它们的样式 链接伪类 :link,控制正常显示时状态 :visited,控制访问过的状态 用户动作伪类 :hover,控制鼠标悬停时的状态 :active,控制被激活时的状态 表格样式 边框合并border-collapse 如果设置了单元格的边框,相邻单元格的边框会单独显示,类似于双线边框 border-collapse属性:合并相邻的边框 设置是否将表格边框合并为单一边框 border-collapse:separate/collapse: 边框边

Bootstrap中六种表格样式

表格 表格是Bootstrap的一个基础组件之一,Bootstrap为表格提供了1种基础样式和4种附加样式以及1个支持响应式的表格.在使用Bootstrap的表格过程中,只需要添加对应的类名就可以得到不同的表格风格,在接下来的内容中,我们会详细介绍Bootstrap的表格使用. 同样的,如果你对CSS预处理器熟悉,你可以使用Bootstrap提供的预处理版本: ?  LESS版本,对应的文件是 tables.less ?  Sass版本,对应的文件是 _tables.scss 如果你不懂LESS

bootstrap表格样式

<body> <div class="container"> <table class="table" >  //表格基本样式 <tr><th>姓名</th><th>性别</th><th>年龄</th></tr> <tr><td>张三</td><td>男</td><td&