Tab
20 Aug 2018 / 3 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.
<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>
<?php
require_once 'EJ\AutoLoad.php';
$ribbon = new \EJ\Ribbon('defaultRibbon');
$aTab = new \EJ\Ribbon\ApplicationTab();
$aTab->type('menu')->menuItemID('ribbonMenu');
$homeTab = new \EJ\Ribbon\Tab();
$sendRect = new \EJ\Ribbon\Tab();
$clipboard1 = new \EJ\Ribbon\Group();
$grpcontent1 = new \EJ\Ribbon\Content();
$contentgroup1 = new \EJ\Ribbon\ContentGroup();
$btnsettings1 = array('contentType'=>'imageonly','imagePosition'=>'imagetop','prefixIcon'=>'e-icon e-ribbon e-ribbonsave');
$contentgroup1->id("save")->text("Save")->toolTip("Save")->buttonSettings($btnsettings1);
$grpcontent1->groups(array($contentgroup1));
$clipboard1->text('Save')->content(array($grpcontent1));
$homeTab->id('home')->text('HOME')->groups(array($clipboard1));
$clipboard2 = new \EJ\Ribbon\Group();
$grpcontent2 = new \EJ\Ribbon\Content();
$contentgroup2 = new \EJ\Ribbon\ContentGroup();
$btnsettings2 = array('contentType'=>'imageonly','imagePosition'=>'imagetop','prefixIcon'=>'e-icon e-ribbon e-ribbonprint');
$contentgroup2->id("print")->text("Print")->toolTip("Print")->buttonSettings($btnsettings2);
$grpcontent2->groups(array($contentgroup1,$contentgroup2));
$clipboard1->text('Save')->content(array($grpcontent1,$grpcontent2));
$homeTab->id('home')->text('HOME')->groups(array($clipboard1));
$sendRect->id('sendRec')->text('Send/Receive')->groups(array('type'=>'custom','contentID'=>'sendReceive'));
echo $ribbon ->width('500px')->applicationTab($aTab)->tabs(array($homeTab,$sendRect))->render();
?>
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page