Search Results for

    Show / Hide Table of Contents

    TStandardSheetSelector Class

    Implements a standard sheet selector (with CSS tabs) that will allow you to change the page when exporting multiple sheets. You can customize its default behavior by altering the CSS properties, or by inheriting from it and replacing the virtual methods. If you want to create a completely new type of sheet selector, derive it from TSheetSelector instead of this class.

    Syntax

    Namespace: FlexCel.Render

    public class TStandardSheetSelector: TSheetSelector

    Constructors

    Name Description
    TStandardSheet​Selector Constructs a new TStandardSheet​Selector instance.

    Methods

    Name Description
    OnSheetSelectorEntry Replace this event when creating a custom descendant of TStandardSheet​Selector.​
    BeforeDrawOne​Sheet​Selector This method is overriden to add a table for layout when LayoutTable is true.
    See the documentation in TSheetSelector.​Before​Draw​OneSheet​Selector for more information on this method.
    AfterDrawOne​Sheet​Selector This method is overridden to add a table for layout when LayoutTable is true.
    See the documentation in TSheetSelector.​After​Draw​OneSheet​Selector for more information on this method.
    DrawOneSheetSelector This method overrides the abstract parent to provide a CSS implementation for tabs.
    Override this method on a child class if you want to completely customize how the Sheet Selector is drawn.
    Normally you can just change the CSS properties of this class to customize the SheetSelector, but you can use this if you want to provide a completely different selector. You can use the TSheetSelector.Links collection to know which hyperlinks to place in each place.
    ReplaceMacros This is an utility method that will replace all the <#...> macros inside a tag by its values.
    Normally you do not need to call this method, since it is called automatically by WriteOneCssRule
    WriteOneCssRule This method is an utility to write one rule in a TStandarSheet​Selector​Styles class.
    WriteOneCssClass This method is an utility to write all the classes of an TStandardSheet​Selector​Styles class.
    WriteCssClasses This method is in charge of writing the style definitions in the header of the html file.
    Note that you normally do not need to override this method, you can just change the CSS properties of this class.
    You can override this method if you want full control on how to export the classes.

    Properties

    Name Description
    CssGeneral Style to be applied to the selector. This is a general setting, you can later further customize the style when the selector is at the Left, Top, Right or Bottom with the corresponding CssWhenLeft, CssWhenTop, CssWhenRight and CssWhenBottom properties.
    CssWhenLeft Specific style to be applied to the selector when it goes at the left. This style will override the style you specify with CssGeneral
    CssWhenTop Specific style to be applied to the selector when it goes at the top. This style will override the style you specify with CssGeneral
    CssWhenRight Specific style to be applied to the selector when it goes at the right. This style will override the style you specify with CssGeneral
    CssWhenBottom Specific style to be applied to the selector when it goes at the bottom. This style will override the style you specify with CssGeneral
    CssStyleSheetContent Style to be applied to the sheet content.
    CssStyleLayoutTable Style to be applied to the layout table if LayoutTable is true.
    CssTags This property has a list of Macros that you can use in the CSS definitions. You can reference this value in the CSS properties by using <#variable>

    For example, you could set a Macro "Mycolor" with CssTags.​Add(​"mycolor"​, "red"); and then define a CssProperty: CssWhenTop.Main = "background-​color:​<​#​mycolor>​";



    This method by default contains the following Macros:...[more]



    You can modify those Macros or add your own definitions here and use them when defining your CSS.

    ...[more]
    LayoutTable When this property is true (the default), both selectors at the left and at the right will be layed out in a table.
    This has the advantage that block will not wrap down when resizing the window. But if you would prefer not to use tables for layout, you can turn this property off, and the layout will be pure CSS (and it will wrap down when there is not enough space).
    If you do not have a selector in the left or the right this property does nothing.
    UseSheetTabColors When true (the default) and the sheets have a tab color defined in Excel, FlexCel will use this color to render the sheet tabs.
    If false, the default tab color will be used. Note that if the sheets don't have a color defined in Excel, also the default tab color will be used.

    Events

    Name Description
    SheetSelectorEntry Use this event to customize the text and link on the individual tabs. The tab style itself must be modified with the CSS properties.
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com