IsToogleButton: Boolean
The IsToogleButton property determines whether the button can be toggled (pressed or pulled).
By default the property is set to false: that is, the button state cannot be changed. If the property is set to True, the button can be pressed or pulled.
Seebelow an example of the tool ribbon button when pressed:
When pulled:
To execute the example, create tool ribbon button named Image. Select an image for the button; this requires the image file angles.png where the user can select an icon. Determine that the button state cannot be toggled:
var button = new PP.Ui.RibbonButton({ ParentNode: document.getElementById("div2"), Content: "Image", ImageList: new PP.ImageList({ Source: "PP_img/angles.png", IconWidth: 29, IconHeight: 29 }), ColumnIndex: 0, RowIndex: 0, IsToggleButton: true, Click: function () { alert ("Click button")} })
After executing the example the page contains a button named Image that has an image selected from the angles.png file:
Clicking the button shows the message "Click button", but the button appearance remains unchanged (the button is not shown as pressed).
See also: