Sheet Tab Color and tab image

Posted by: lambchop4697 on 8 September 2017, 2:39 pm EST

  • Posted 8 September 2017, 2:39 pm EST

    Sorry folks, but I have seen several posts on coloring individual tabs, but I cannot seem to get it to work.  The best example of what I am trying to do is in a forum post #52694 and the image example.  But when I set fpspread1.tabpage(0).backcolor =, it does not work, are there any particular properties that I need to set?  Additionally, I need to add an image to DIFFERENT tabs in the tab strip, is there an example of this where different tabs paint either no icons or different icons (e.g. forum post #29891) ?  The PaintSheetTab seems to work if ALL of the tabs are getting painted or images put on all of them, but to create different paints, then I have to create a synchronized collection which would be cumbersome (but do-able).

    So please let me know when you get the chance.


  • Replied 8 September 2017, 2:39 pm EST

    Here is some code that works for setting the TabStripBackColor of the active Tab. The EnhancedInterfaceRenderer has methods and properties for customizing the Interface but I did not see a method for putting an image onto a typical Tab, there as a method PaintSpecialTab that can take an image argument, but thats just for the special insert tab. Also the InterfaceRenderer property is only on the FpSpread, SpreadSkin, and SpreadView classes so I don't see a way to set individual sheet tabs different colors.

    FarPoint.Win.Spread.EnhancedInterfaceRenderer eir = new FarPoint.Win.Spread.EnhancedInterfaceRenderer();

    eir.SheetTabLowerActiveColor = Color.Red;

    eir.SheetTabUpperActiveColor = Color.Pink;

    fpSpread1.InterfaceRenderer = eir;

  • Replied 8 September 2017, 2:39 pm EST

    I did a little more research and found the SheetTab class that also has a BackColor property I was able to set Tabs to different colors with this code, but still don't know a way to add an image.

    fpSpread1.InterfaceRenderer = null;

    fpSpread1.VisualStyles = FarPoint.Win.VisualStyles.Off;

    FarPoint.Win.Spread.SheetTab st0;

    st0 = fpSpread1.TabStrip[0];

    st0.BackColor = Color.Red;

    FarPoint.Win.Spread.SheetTab st1;

    st1 = fpSpread1.TabStrip[1];

    st1.BackColor = Color.White;

    FarPoint.Win.Spread.SheetTab st2;

    st2 = fpSpread1.TabStrip[2];

    st2.BackColor = Color.Blue;


  • Replied 8 September 2017, 2:39 pm EST

    Paul... Thank you sir for the detailed answer.  I see that my problem has been that I have left the visualstyles."on" instead of "off", that part is working now.  I am still in need of some way to put an image on the tab, but I understand your dilemma as my only solution has been to use an override on the paint tab, but it ... uh... has issues Indifferent   ... so let me know if you think of a better approach.  Much thanks!


Need extra support?

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

Learn More

Forum Channels