Button.EnableEdit

Syntax

EnableEdit: Boolean;

Description

The EnableEdit property determines whether button contents can be edited.

Comments

Available values:

Use JSON or the setEnableEdit method to set the property value, and the getEnableEdit method to get the property value.

Example

To execute the example, the HTML page must contain links to PP.js script file and to PP.css styles file in the <body> tag of the HTML page of the <div> item with the button identifier. In the onload event of the <body> tag it is necessary to specify the call of the createButton() function. Add button on the page and implement a handler of the ContentChanged event:

var button;
function createButton() {
    // Create a button   
    button = new PP.Ui.Button({
        // Set parent item  
        ParentNode: "button",
                 // Set the attribute that button contents can be edited
                EnableEdit: true,
                 // Set button contents
                Content: "Button",
                 // Handle the event of button contents change
                ContentChanged: function (sender, args) {
            console.log("Button contents is changed");
        }    
    });
}

After completing the edit of the button contents (loss of the focus) the browser console displays appropriate message:

Button contents is changed

See also:

Button