Having trouble getting help?
Contact Support
Contact Support
Tab
27 Aug 20184 minutes to read
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.
<ej-ribbon id="Default" width="500px" applicationTab.type="menu" applicationTab.menuItemID="ribbonmenu">
<e-tabs>
<e-tab id="home" text="HOME" [groups]="groups1">
</e-tab>
<e-tab id="sendrec" text="Send/Receive" [groups]="group2">
</e-tab>
</e-tabs>
</ej-ribbon>
<ul id="ribbonmenu">
<li>
<a>FILE</a>
<ul>
<li><a>New</a></li>
<li><a>Open</a></li>
<li><a>Save</a></li>
<li><a>Save as</a></li>
<li><a>Print</a></li>
</ul>
</li>
</ul>
<div id="sendReceive">
Send/Receive All Folders
</div>
import {Component} from '@angular/core';
import {NorthwindService} from '../../services/northwind.service';
@Component({
selector: 'ej-app',
templateUrl: 'app/components/ribbon/ribbon.component.html',
providers: [NorthwindService]
})
export class RibbonComponent {
constructor(public northwindService: NorthwindService) {}
groups1 = [{
text: "Save",
content: [{
groups: [{
text: "Save",
isBig: true,
buttonSettings: {
prefixIcon: "e-icon e-save",
contentType: "imageonly"
}
}]
}]
}, {
text: "Print",
content: [{
groups: [{
text: "Print",
isBig: true,
type: "togglebutton",
toggleButtonSettings: {
contentType: "imageonly",
defaultText: "Print",
activeText: "Print",
defaultPrefixIcon: "e-icon e-print",
activePrefixIcon: "e-icon e-print",
}
}]
}]
}];
group2 = [{
type: "custom",
contentID: "sendReceive"
}];