找回密码
 立即注册

QQ登录

只需一步,快速开始

burns

初级会员

24

主题

54

帖子

498

积分

初级会员

积分
498

活字格认证

burns
初级会员   /  发表于:2013-8-27 17:04  /   查看:5394  /  回复:7
如题

7 个回复

倒序浏览
iceman
社区贡献组   /  发表于:2013-8-27 18:08:00
沙发
回复 1楼burns的帖子

测试代码如下:

  1.         private void Form1_Load(object sender, EventArgs e)
  2.         {
  3.             fpSpread1.VisualStyles = FarPoint.Win.VisualStyles.Off;
  4.             fpSpread1.Sheets[0].RowCount = 10;
  5.             fpSpread1.Sheets[0].ColumnCount = 15;
  6.             // Show the footer.
  7.             fpSpread1.Sheets[0].ColumnFooterVisible = true;
  8.             fpSpread1.Sheets[0].ColumnFooterRowCount = 2;
  9.             fpSpread1.Sheets[0].ColumnFooter.DefaultStyle.Renderer = new FarPoint.Win.Spread.CellType.ColumnHeaderRenderer();

  10.             FarPoint.Win.Spread.GridLine gl = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.None, Color.Crimson, Color.Goldenrod, Color.BurlyWood);
  11.             fpSpread1.Sheets[0].ColumnFooterHorizontalGridLine = gl;
  12.             //new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.Crimson);
  13.             fpSpread1.Sheets[0].ColumnFooterVerticalGridLine = gl;
  14.             //new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.BurlyWood);
  15.             fpSpread1.Sheets[0].ColumnFooterSheetCornerHorizontalGridLine = gl;
  16.             //new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.Crimson);
  17.             fpSpread1.Sheets[0].ColumnFooterSheetCornerVerticalGridLine = gl;

  18.         }
复制代码
回复 使用道具 举报
burns
初级会员   /  发表于:2013-8-27 20:12:00
板凳
private void Form1_Load(object sender, EventArgs e)
        {
            fpSpread1.VisualStyles = FarPoint.Win.VisualStyles.Off;
            fpSpread1.Sheets[0].RowCount = 10;
            fpSpread1.Sheets[0].ColumnCount = 15;
            // Show the footer.
            fpSpread1.Sheets[0].ColumnFooterVisible = true;
            fpSpread1.Sheets[0].ColumnFooterRowCount = 2;
            fpSpread1.Sheets[0].ColumnFooter.DefaultStyle.Renderer = new FarPoint.Win.Spread.CellType.ColumnHeaderRenderer();

            FarPoint.Win.Spread.GridLine gl = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.None, Color.Crimson, Color.Goldenrod, Color.BurlyWood);
            fpSpread1.Sheets[0].ColumnFooterHorizontalGridLine = gl;
            //new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.Crimson);
            fpSpread1.Sheets[0].ColumnFooterVerticalGridLine = gl;
            //new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.BurlyWood);
            fpSpread1.Sheets[0].ColumnFooterSheetCornerHorizontalGridLine = gl;
            //new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, Color.Crimson);
            fpSpread1.Sheets[0].ColumnFooterSheetCornerVerticalGridLine = gl;

        }

这样设置又有个底纹。FarPoint.Win.Spread.GridLine gl = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.None, Color.White, Color.White, Color.White);也还是这样。


我原来是:
FarPoint.Win.Spread.StyleInfo test = new FarPoint.Win.Spread.StyleInfo();
            test.BackColor = System.Drawing.Color.White;
            test.Border = new ComplexBorder(null, null, null, null);
            this.fpSpread1.ActiveSheet.ColumnFooter.DefaultStyle = test;

这个底纹是白色了,但是Border不起作用。

如果把您上边的再加上
FarPoint.Win.Spread.StyleInfo test = new FarPoint.Win.Spread.StyleInfo();
            test.BackColor = System.Drawing.Color.White;
            test.Border = new ComplexBorder(null, null, null, null);
            this.fpSpread1.ActiveSheet.ColumnFooter.DefaultStyle = test;

边框又出现了。
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2013-8-28 11:41:00
地板
回复 3楼burns的帖子

burns 你好,

能否发个 Demo 到论坛调试?
或者你需要的效果图。

这样交流很抽象,我无法确定你需要的样式。
谢谢配合
回复 使用道具 举报
burns
初级会员   /  发表于:2013-8-28 20:26:00
5#
很简单,我只需要 ColumnFooter预览时无边框无底纹(全白的)

在全白的基础上,动态生成 ColumnFooter,包括设置ColumnFooter行高、列宽、合并某几个单元格及某个单元格的边框与数据类型等即可。
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2013-8-29 10:26:00
6#
回复 5楼burns的帖子

burns 你好,
请通过以下代码测试:

  1. private void Form1_Load(object sender, EventArgs e)
  2.         {
  3.             fpSpread1.VisualStyles = FarPoint.Win.VisualStyles.Off;
  4.             fpSpread1.Sheets[0].RowCount = 10;
  5.             fpSpread1.Sheets[0].ColumnCount = 15;
  6.             // Show the footer.
  7.             fpSpread1.Sheets[0].ColumnFooterVisible = true;
  8.             fpSpread1.Sheets[0].ColumnFooterRowCount = 2;
  9.             fpSpread1.Sheets[0].ColumnFooter.DefaultStyle.Renderer = new FarPoint.Win.Spread.CellType.ColumnHeaderRenderer();

  10.             FarPoint.Win.Spread.GridLine gl = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.None, Color.White, Color.White, Color.White);
  11.             fpSpread1.Sheets[0].ColumnFooterHorizontalGridLine = gl;
  12.             fpSpread1.Sheets[0].ColumnFooterVerticalGridLine = gl;
  13.             fpSpread1.Sheets[0].ColumnFooterSheetCornerHorizontalGridLine = gl;
  14.             fpSpread1.Sheets[0].ColumnFooterSheetCornerVerticalGridLine = gl;
  15.             fpSpread1.Sheets[0].ColumnFooter.Rows[0, 1].BackColor = Color.White;
  16.             fpSpread1.Sheets[0].ColumnFooterSheetCornerStyle.BackColor = Color.White;
  17.             fpSpread1.Sheets[0].ColumnFooterSheetCornerStyle.Border = new FarPoint.Win.LineBorder(Color.White, 0);
  18.         }
复制代码
回复 使用道具 举报
burns
初级会员   /  发表于:2013-8-29 23:37:00
7#
非常感谢。
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2013-8-30 11:16:00
8#
回复 7楼burns的帖子

好的,不客气,有问题欢迎继续提问。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部