AdvStringGrid
2009-07-05 15:25
309 查看
//从文件中加载
asg.LoadFromCSV(Path+FileName);
//清空所有行
asg.ClearRows(0,asg.RowCount-1);
//保存
asg.SaveToCSV(Path+'Test.csv');
ColCount := 41; {总列数}
RowCount := 3; {总行数}
FixedRows := 2; {表头行数}
FixedCols := 2; {表头列数}
DefaultColWidth := 18; {设缺省列宽}
DefaultRowHeight := 18; {设缺省行高}
ColWidths[0] := 56; {设表头第一列宽}
RowHeights[0] := 20; {设表头第一行高}
MergeCells(0,0,1,2); {合并函数:列,行,合并多少列,合并多少行}
Cells[0,0] := '期数'; {显示文字}
{对符合条件的列行着背景色和文字色、类型}//OnGetCellColor事件
if (not(aRow In [0..1])) and (aCol In [2..11]) then
begin
AFont.Style := AFont.Style + [fsBold];
ABrush.Color := $00E0FFFA;
AFont.Color := clWhite;
end;
Halign := taCenter; {文字水平垂直居中}//OnGetAlignment事件
asg.LoadFromCSV(Path+FileName);
//清空所有行
asg.ClearRows(0,asg.RowCount-1);
//保存
asg.SaveToCSV(Path+'Test.csv');
ColCount := 41; {总列数}
RowCount := 3; {总行数}
FixedRows := 2; {表头行数}
FixedCols := 2; {表头列数}
DefaultColWidth := 18; {设缺省列宽}
DefaultRowHeight := 18; {设缺省行高}
ColWidths[0] := 56; {设表头第一列宽}
RowHeights[0] := 20; {设表头第一行高}
MergeCells(0,0,1,2); {合并函数:列,行,合并多少列,合并多少行}
Cells[0,0] := '期数'; {显示文字}
{对符合条件的列行着背景色和文字色、类型}//OnGetCellColor事件
if (not(aRow In [0..1])) and (aCol In [2..11]) then
begin
AFont.Style := AFont.Style + [fsBold];
ABrush.Color := $00E0FFFA;
AFont.Color := clWhite;
end;
Halign := taCenter; {文字水平垂直居中}//OnGetAlignment事件
相关文章推荐
- AdvStringGrid 标题头
- AdvStringGrid 列宽度、列移动、行高度、自动调节
- AdvStringGrid 获取值
- AdvStringGrid使用技巧
- AdvStringGrid单元格获得焦点
- delphi AdvStringGrid 检索数据的行数
- Advstringgrid 单元格的垂直对齐
- advSTRINGGRID加下列列表框combobox
- Delphi AdvStringGrid表格保存和TClientDataSet发生关系的构想。
- TMS AdvStringGrid
- AdvstringGrid设置标题行对齐方式
- advstringgrid 使用
- DELPHI中利用AdvStringGrid往数据库中导入数据出现的问题
- 赞一下TMS Software 和 AdvStringGrid
- 动态AdvStringGrid完美示例 (AdvStringGrid使用技巧/Cells)
- Delphi TAdvStringGrid的设置显示自动列宽
- AdvStringGrid 滚动条问题
- AdvStringGrid 垂直居中 、水平居中
- 学习和使用AdvStringGrid
- AdvStringGrid之表脚统计实现