How do I make the SheetCorner look like the rest of the RowHeader and ColumnHeader rows and columns

Posted by: j2associates on 8 September 2017, 1:24 pm EST

  • Posted 8 September 2017, 1:24 pm EST

    Hello all,


    When you have a multi column RowHeader or multi row ColumnHeader the additional rows and columns appear gray. How do I make the SheetCorner match that appearance? Thanks in advance for any ideas and/or suggestions!

  • Replied 8 September 2017, 1:24 pm EST

    Hello,


    To make them look like the ColumnHeaders, you can use code like the following.


    FpSpread1.Sheets(0).SheetCornerStyle.BackColor = Color.FromArgb(255, 211, 220, 233)


    FpSpread1.Sheets(0).SheetCornerStyle.Renderer = New FarPoint.Win.Spread.CellType.EnhancedColumnHeaderRenderer


    To make them look like the RowHeaders, you can use code like the following.


    FpSpread1.Sheets(0).SheetCornerStyle.BackColor = Color.FromArgb(255, 228, 236, 247)


    FpSpread1.Sheets(0).SheetCornerStyle.Renderer = New FarPoint.Win.Spread.CellType.EnhancedRowHeaderRenderer

  • Replied 8 September 2017, 1:24 pm EST

    Hello,


    Attached is what I am seeing. It still doesn't match. This pertains to the same zipped file I sent to ScottS a while ago.


    2008/08/SheetCornerExample2.JPG
  • Replied 8 September 2017, 1:24 pm EST

    Hello,


    You can assign the style to the stylemodel on the CornerSheet, hust as you did in the RowHeader and ColumnHeader.


    FpSpread1.Sheets(0).CornerSheet.Rows(0).BackColor = Color.Red

  • Replied 8 September 2017, 1:24 pm EST

    Thanks ScottS! The problem is that the BackColor for the RowHeader Rows and Columns, the ColumnHeader Rows and Columns and the SheetCorner Rows and Columns are all Color.Empty yet the SheetCorner BackColor appears diffrerently. I would like it to look just like the others, or is that maybe an image being painted on the SheetCorner? Thanks in advance for any ideas and/or suggestions!
  • Replied 8 September 2017, 1:24 pm EST

    j2 -

    Try either of the following...

    FpSpread1.Sheets(0).SheetCorner.DefaultStyle.Renderer = New FarPoint.Win.Spread.CellType.CornerRenderer
    'FpSpread1.Sheets(0).SheetCornerStyle.Renderer = New FarPoint.Win.Spread.CellType.EnhancedColumnHeaderRenderer
    FpSpread1.Sheets(0).SheetCornerStyle.BackColor = SystemColors.Control

    Try uncommenting the second alternative and commenting out the first.  They provide different looks.

  • Replied 8 September 2017, 1:24 pm EST

    Many thanks, BobM! The following did it. It looked like SystemColors.Control to me also, but for the life of me, I couldn't get it right.


    This is another place where it seems that the spread is sometimes needlessly complicated. Why not expose RowHeader.BackColor, ColumnHeader.BackColor, CornerSheet.BackColor, etc. When you don't live with the product everyday like you guys do, it's hard to remember all of the Styles, etc. I'm not suggesting you do away with all of that because it is really slick, but it seems like there would be room for some simpler ways of doing things as well for common, mundane things that would be reasonably expected to be done on a fairly frequent basis.


        .SheetCorner.DefaultStyle.Renderer = New FarPoint.Win.Spread.CellType.CornerRenderer
        .SheetCornerStyle.BackColor = SystemColors.Control


     

  • Replied 8 September 2017, 1:24 pm EST

    j2 -

    I'm not a developer, but I'm sure they have their reasons for doing things as they do.  I also find the new Renderers difficult to understand and work with.  But it is what it is.  I'll forward these types of issues to the development team and see if there is a more intuitive way to handle things.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels