zoukankan      html  css  js  c++  java
  • AdvStringGrid用法

    AdvStringGrid

    //从文件中加载
    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事件

  • 相关阅读:
    HDU.2899.Strange fuction(牛顿迭代)
    BZOJ.3771.Triple(母函数 FFT 容斥)
    树的实现(2)
    树的练习
    死锁问题
    进程的三种状态
    线程的同步与实现
    进程间通信详解
    进程和线程以及它们的区别
    https协议
  • 原文地址:https://www.cnblogs.com/hnxxcxg/p/2940852.html
Copyright © 2011-2022 走看看