Hi Antonio,
Thanks for contacting Syncfusion support.
Query: Can I disable/enabled buttons programmatically?
We use disable()/enable() button methods to disable/enabled button in the ribbon control. In which, we get the button object from ribbon control using button id.
Please refer to the code and UG link
[Code]
<script>
$(function () {
var btnObj = $("#defaultRibbon_new").data("ejButton");// find button object from ribbon control, defaultRibbon is ribbon id and new is group id.
btnObj.disable();//disable the button
btnObj.enable(); //enable the button
});
</script>
UG link: http://help.syncfusion.com/js/api/ejbutton#methods:disable
Query: Is it posible to center text & icon in buttons?
Yes, to align text and icon in center of button, we have enabled e-buttonsettings-text, e-buttonsettings-contenttype, e-buttonsettings-imageposition property in the ribbon control.
Please refer to the code.
<body ng-controller="RibbonCtrl">
<div e-groups>
<div e-group e-id="new" e-text="New" e-customtooltip-content="<h6>New.</h6>" e-buttonsettings-text="New1" e-buttonsettings-contenttype="textandimage" e-buttonsettings-imageposition="imagetop" e-buttonsettings-prefixicon="e-ribbon e-new" e-buttonsettings-click="executeAction">
</div>
</div>
</body>
We can customize the button settings in the ribbon control using e-buttonsettings property. Please refer to the UG link and sample.
UG link: http://help.syncfusion.com/js/api/ejbutton
Sample: http://www.syncfusion.com/downloads/support/forum/121406/ze/sample-1221719873.zip
Regards,
Kavitha N.