Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Disabled MenuButton doesnt reflect its state in its icon

$
0
0
Hello,

We have this case where a disabled menu item still has an enabled looking icon, we would expect this to be visually reflected too in a disabled looking icon (eg add_Disabled.png is our example.

Code:

        public Canvas getViewPanel() {
               
                String ICON_SKIN_ACTION_ADD = "[SKINIMG]/actions/add.png";
               
                RibbonBar bar = new RibbonBar();
                RibbonGroup group = new RibbonGroup();
                group.setNumRows(1);
                group.setTitle("Group");
                group.setRowHeight(76);
               
                IconMenuButton button = new IconMenuButton("Add");
                button.setIcon(ICON_SKIN_ACTION_ADD);
                button.setLargeIcon(ICON_SKIN_ACTION_ADD);
                button.setOrientation("vertical");
                group.addControl(button);
               
                Menu menu = new Menu();
                button.setMenu(menu);
               
                MenuItem item1 = new MenuItem("Add Before");
                item1.setIcon(ICON_SKIN_ACTION_ADD);
                item1.setEnabled(false);
                menu.addItem(item1);
               
                bar.addMember(group);
               
                final VLayout v = new VLayout();
                v.setOverflow(Overflow.VISIBLE);
                v.addMember(bar);
               
                return v;
        }

Can we achieve this functionality somehow, is this a bug or isn't this supposed to be working as we expect?

We are on v9.0p_2013-10-27.

thanks

Viewing all articles
Browse latest Browse all 4756

Trending Articles