Ribbon.setSettingsTo

Syntax

setSettingsTo (controls, settings);

Parameters

controls. Control.

settings. JSON object that contains component properties.

Description

The setSettingsTo methods sets JSON object that contains settings for the specified control.

Example

To execute the example, the HTML page must contain the Ribbon component named "ribbon" (see Example of Creating the Ribbon Component). The root must include the folder named samle_img that contains button icons. The ribbon includes a tab that houses the panel named pan1.

//Create a button

var but1 = new PP.Ui.RibbonButton();

//Place the button on the panel

pan1.addControl(but1);

//JSON object that contains button settings:

var set1 = { Content: "Graph", ImageUrl: "img/ribbon_img/chart.png" };

//Define button settings:

ribbon.setSettingsTo(but1,set1);

After executing the example a button with an icon and the Lines label is placed on the panel.

See also:

Ribbon