[CONNECT Ribbon] Display Icon for a submenu under DropDownButton SplitButton

I am using a Ribbon containing Splitbuttons and DropDownButtons. Under one of these I want to make a SubMenu with a few MenuItems. Now the SplitButton and DropDownButton each have their appropriate Icons and also the MenuItems have Icons, but the submenu in between doesn't show up with an icon, see image. Althoug in the customize ribbon menu there is an option to attach an icon to the submenu, as soon as you klick Apply the icon is detached.

Is this a bug or is there another way to attach an icon to a submenu? 

Paul

 ~~

  • Hi Paul,

    I think submenu item cannot have own icon assigned.

    A general concept of ribbon structure as I understand it (and how is defined in RibbonDefinitions.xsd) is that icons are defined / configured as a part of command specification, not the specification of ribbon item itself. And because the submenu does not represent any command, but only a reference to another item menu.

    From this perspective, it seems to be bug that "Icon Name" configuration is enabled when SubMenu is selected.

    With regards,

      Jan

  • Hi Jan,

    What do you say than about split buttons and drop down buttons. In fact the act more ore less the same as a submenu, the don't have directly commands associated, but the do have icons.

    Paul

     ~~

  • Found the button (sorry, wasn't signed in) but see no Admin group to move to.

  • Hi Paul,

    In fact the act more ore less the same as a submenu

    I think to say they are similar can be confusing, because all three mentioned GUI objects have different functionalities and are designed for different situations, so they also behave differently (despite of some differences are quite subtle).

    the don't have directly commands associated, but the do have icons.

    It's not correct.

    SplitButton

    • Has no own icon by default (icon cannot be set in ribbon customization dialog) and no command can be defined. As "active SplitButton icon" is used the icon of last used command from a container assigned to SplitButton.
    • Using ribbon XML definition, it's possible to assign command directly to SplitButton and in such case also the icon can be defined, but only as a part of CommandData structure, not directly assigned to the button definition. I am not sure how exactly the button works in this case, but its icon is defined as a part of the command definition.

    DropDownButton

    • Yes, there is an exception from common approach and this type of button can have own icon defined (as a part of DropDownButtonData structure) without necessity to define command.

    I guess DropDownButton is implemented differently to allow to use an icon to express a characteristic of item in DropDownButton  collection. The same approach is not used for SplitButton, because by definition it shows the icon of last used item.

    What do you say than

    I do not say anything, I treat such discussion about tiny differences between GUI items a bit useless. Bentley decided to implement ribbon GUI and its structure and features in some way and for some reasons. Concepts and details are not explained anywhere unfortunately, so the only way is "to accept the features".

    Maybe somebody from Bentley will provide extra details or even I am not right and there is a way how to define the icon for submenu.

    You can also create Idea to extend (sub)menu definition, alternatively you can try to implement own ribbon item programatically, but it's not simple.

    With regards,

      Jan