Updating skin

Posted by: msmith on 18 February 2019, 10:59 am EST

    • Post Options:
    • Link

    Posted 18 February 2019, 10:59 am EST - Updated 30 September 2022, 4:58 am EST

    Hi,

    Using the skin editor how can I update the column and row headers (see pic) to change the highlight color. I’m trying to do a ‘blue’ colored theme rather than green to match my app but the Skin editor properties don’t appear to offer the ability to change. I’m using the default Office2016Colorful skin as a basis.

    Thanks

  • Posted 19 February 2019, 12:37 am EST - Updated 30 September 2022, 4:58 am EST

    Hello,

    You should be able to create a custom skin and set the highlight color for header.

    Please refer to the attached image.

    Thanks,

    Deepak Sharma

  • Posted 20 February 2019, 11:43 am EST - Updated 30 September 2022, 4:58 am EST

    deepak,

    Thanks for your response. I’ve set all options to (none) as shown and the headers have totally disappeared and no options to edit settings are available.

    Just to clarify what I want to do - I just need to access the color of the highlighted area (in red) to change that from green to another color. Is there some way to expose that setting?

    Thanks again.

    Regards,

    Matt

  • Posted 20 February 2019, 10:22 pm EST - Updated 30 September 2022, 4:58 am EST

    Hi Matt,

    You can further change the Renderer for ColumnHeaderDefaultStyle. Please have a look at the attached image.

    Thanks,

    Deepak Sharma

  • Posted 25 February 2019, 9:46 am EST - Updated 30 September 2022, 4:58 am EST

    Hi Deepak,

    Unfortunately that still doesn’t help me - using the EnhancedRowHeaderRenderer as suggested doesn’t give access to the highlight edge.

    I really would like to take your modern existing Office2016Colorful (or even Office2013) style as a template. Currently with this I can completely customise every single color across the entire control I want except the highlighted edge of the column or row header (as shown in the pic).

    Therefore can I please request that you expose that color.

    Regards,

    Matt

  • Posted 26 February 2019, 12:37 am EST

    Hi Matt,

    I have asked our development team if there is a way to do change the color of bottom border of selected header cells for Office2016Colorful skin.

    I will let you know as soon as I get an update on it. The tracking id for this is #270322.

    Thanks,

    Deepak Sharma

  • Posted 26 February 2019, 11:11 am EST

    Deepak ,

    Great thanks! Sorry to harp on about it but would love to update that color to match our product theme.

  • Posted 26 February 2019, 5:46 pm EST

    Hi Matt,

    Our development team wants to know if you are using the FpSpread.DefaultSkin or FpSpread.Skin for changing skin ?

    Thanks,

    Deepak Sharma

  • Posted 27 February 2019, 7:24 am EST

    Hi Matt,

    it can be done

    you have to create your own FlatColumnHeaderRenderer

    Override PaintHeader and use there PaintSpecialActiveSelection to create your own color(s)

    For the rows you need to do the same

    Hope this helps

    Regards,

    PietF

  • Posted 27 February 2019, 9:40 am EST

    Guys,

    Ok thanks I’ll check that out. Just been using the editor ATM to configure what I wanted so hadn’t got as far as using .Skin or .DefaultSkin.

  • Posted 5 March 2019, 7:45 pm EST

    Hello,

    The color of selection in the columnHeader/RowHeader is not public so we can not change directly to other color. But we can write the custom columnHeaderReander/CustomRowheaderRender, please check the code bellow to detail. In the bellow code I change the color of header selection to the Red.

    
    private void Form1_Load(object sender, EventArgs e)
        {
          fpSpread1.LegacyBehaviors = LegacyBehaviors.All;
          fpSpread1.Reset();
     
          SpreadSkin skin = DefaultSpreadSkins.Office2016Colorful.Clone() as SpreadSkin;
          skin.Name = "CustomSkin";
          skin.ColumnHeaderDefaultStyle = skin.ColumnHeaderDefaultStyle.Clone() as NamedStyle;
          skin.ColumnHeaderDefaultStyle.Name = "CustomColumn";
          skin.ColumnHeaderDefaultStyle.Renderer = new CustomColumnHeaderRender();
          skin.RowHeaderDefaultStyle = skin.RowHeaderDefaultStyle.Clone() as NamedStyle;
          skin.RowHeaderDefaultStyle.Name = "CustomRow";
          skin.RowHeaderDefaultStyle.Renderer = new CustomRowHeaderRender();
          fpSpread1.Skin = skin;
        }
     
         public class CustomColumnHeaderRender : FlatColumnHeaderRenderer
        {
          protected override void PaintSpecialActiveSelection(Graphics g, Rectangle r, System.Drawing.Color color, FarPoint.Win.Spread.Appearance appearance)
          {
            color = System.Drawing.Color.Red;//change code of header selection border
            base.PaintSpecialActiveSelection(g, r, color, appearance);
          }
        }
        public class CustomRowHeaderRender : FlatRowHeaderRenderer
        {
          protected override void PaintSpecialActiveSelection(Graphics g, Rectangle r, System.Drawing.Color color, FarPoint.Win.Spread.Appearance appearance)
          {
            color = System.Drawing.Color.Red;//change code of header selection border
            base.PaintSpecialActiveSelection(g, r, color, appearance);
          }
        }
    

    I hope it helps!

    Thanks,

    Deepak Sharma

Need extra support?

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

Learn More

Forum Channels