Tab

Tab is a collection of control groups which enables you to organize related commands into single view. Tabs can be added to Ribbon using tabs property. id & text properties are used to set unique ID and header text to Tab.
The manipulation of given text tab in the ribbon control can be done by using addTab, removeTab, hideTab,
showTab methods and tabAdd, tabCreate, tabRemove, tabClick and tabSelect events.

  • html
  • <div id="Ribbon"></div>
        <ul id="ribbonMenu">
            <li>
                <a>FILE</a>
                <ul>
                    <li><a>Open</a></li>
                </ul>
            </li>
        </ul>
        <div id="sendReceive">
            Send/Receive All Folders
        </div>
    
    /// <reference path="tsfiles/jquery.d.ts" />
    /// <reference path="tsfiles/ej.web.all.d.ts" />
    
    module RibbonComponent {
        $(function () {
            var sample = new ej.Ribbon($("#Ribbon"), {
                    width: "500px",
                    applicationTab: {
                        type: ej.Ribbon.applicationTabType.menu,
                        menuItemID: "ribbonMenu"
                    },
                    tabs: [{
                        id: "home",
                        text: "HOME",
                        groups: [{
                            text: "Save",
                            content: [{
                                groups: [{
                                    text: "Save",
                                    isBig: true,
                                    buttonSettings: {
                                        prefixIcon: "e-icon e-save",
                                        contentType: ej.ContentType.ImageOnly
                                    }
                                }]
                            }]
                        }, {
                            text: "Print",
                            content: [{
                                groups: [{
                                    text: "Print",
                                    isBig: true,
                                    type: ej.Ribbon.type.toggleButton,
                                    toggleButtonSettings: {
                                        contentType: ej.ContentType.ImageOnly,
                                        defaultText: "Print",
                                        activeText: "Print",
                                        defaultPrefixIcon: "e-icon e-print",
                                        activePrefixIcon: "e-icon e-print",
                                    }
                                }]
                            }]
                        }]
                    }, {
                        id: "sendRec",
                        text: "Send/Receive",
                        groups: [{
                            type: "custom",
                            contentID: "sendReceive"
                        }]
                    }]
                });
            });
      }