Spacer

This item takes space on the ribbon and is used for aligning controls.

DHX Ribbon spacer

Adding Spacer

A new Spacer can be created with the help of the add() method of Tree Collection:

ribbon.data.add({
    type:"spacer"
});

Attributes

Spacer can have two attributes:

  • type - (string) the type of a control, set it to "spacer"
  • id - (string) the ID of a control, automatically generated if you do not set it

Showing/hiding spacer

You can hide and show Spacer with the methods of ribbon:

ribbon.show(id);
ribbon.hide(id);
Back to top