Unplanned
Last Updated: 25 Nov 2020 12:33 by ADMIN
Albert Shenker
Created on: 19 Nov 2020 19:35
Category: RibbonBar
Type: Feature Request
0
disabled button image

When the ImageUrl or ImageUrlLarge property is set and a button is disabled, it should show the ImageUrl or ImageUrlLarge image instead of a non-descript "x" image. This should be the default behavior when the DisabledImageUrl and DisabledImageUrlLarge proeprties are not set. I have created some javascript which accomplishes this, however this is really overkill and is as always subject to breakage if you change the control. I'm not sure why you guys decided your random "X" image would be a better indicator of a disabled button than the original image.

 

function setRibbonDisabledImages(ribbonBar) {

        var tabs = ribbonBar.get_tabs();

        for (i = 0; i < tabs.get_count(); i++) {

            var tab = tabs.getTab(i);

            var groups = tab.get_groups();

            for (j = 0; j < groups.get_count(); j++) {

                var group = groups.getGroup(j);
                var items = group.get_items();

                for (k = 0; k < items.get_count(); k++) {

                    var item = items.getItem(k);

                    if (item.get_imageUrl()) {
                        item.set_disabledImageUrl(item.get_imageUrl());
                    }
                    if (item.get_imageUrlLarge()) {
                        item.set_disabledImageUrlLarge(item.get_imageUrlLarge());
                    }

                }

            }

        }

    }

 

1 comment
ADMIN
Vessy
Posted on: 25 Nov 2020 12:33

Hi Albert,

Thanks a lot for your feature request! We will track the interest in such change and will consider its implementation depending on the popularity of this item.

Regards,
Vessy
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.