4.0 renderers?

Posted by: zenrhapsody on 8 September 2017, 1:08 pm EST

  • Posted 8 September 2017, 1:08 pm EST

    Do you have any updated documentation on controlling the new renderer features in 4.0?  I do like new look, but I want to modify colors of column/row headers at runtime.  (Basically, I'm implmenting Office 2007 color themes, and the standard spread 4 header colors are'nt the best for some color schemes.)

    The old 3.0 method of setting columnHeader cells backcolor is ignored.  I've also tried creating a new EnhancedColumnHeaderRenderer class and setting color properties (after sheet is created and displayed), but that is also ignored.


  • Replied 8 September 2017, 1:08 pm EST

    ZenRhapsody -

    You can do the column header like so...

    FpSpread1.ActiveSheet.ColumnHeader.Rows(0).Renderer = New FarPoint.Win.Spread.CellType.ColumnHeaderRenderer
    FpSpread1.ActiveSheet.ColumnHeader.Rows(0).BackColor = Color.Red

    The RowHeader would follow the similiar syntax.
  • Replied 8 September 2017, 1:08 pm EST

    You might have to turn off VisualStyles if you are using them...

    FpSpread1.Sheets(0).VisualStyles = FarPoint.Win.VisualStyles.Off

  • Replied 8 September 2017, 1:08 pm EST

    The developer's guide section (appearance section) has some information about how to set things like the grayareabackcolor, get the older default look and so on.

    FpSpread1.InterfaceRenderer = Nothing
    ' set the column header renderer to the default
    FpSpread1.ActiveSheet.ColumnHeader.DefaultStyle.Renderer = New
    ' set the row header renderer to the default
    FpSpread1.ActiveSheet.RowHeader.DefaultStyle.Renderer = New
    ' set the sheet corner renderer to the default
    FpSpread1.ActiveSheet.SheetCorner.DefaultStyle.Renderer = New
    FpSpread1.HorizontalScrollBar.Renderer = Nothing
    ' set the scroll bar renderers to the default
    FpSpread1.VerticalScrollBar.Renderer = Nothing
    ' The focus indicator can be set to the version 3 look as
    'FpSpread1.FocusRenderer = New

Need extra support?

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

Learn More

Forum Channels