Dialog Constructor

Syntax

PP.Ui.Dialog(settings);

Parameters

settings. The JSON object that contains the component property values.

Description

The Dialog constructor creates an instance of the Dialog class.

Example

To execute the example, add links to the PP.js library and the PP.css visual styles. The HTML page must contain the div element with the "but" identifier. Below is the Javascript code that is used to create a button, clicking which opens the dialog box:

<script type="text/javascript">

    var dialog = new PP.Ui.Dialog();

    dialog.setHeight(150);

    dialog.setWidth(250);

    dialog.setContent("New dialog");

    dialog._OkButton.setContent("OK");

    dialog._CancelButton.setContent("Cancel");

    var but = new PP.Ui.Button({ ParentNode: document.getElementById("but"), Content: "Open dialog" });

    but.Click.add(function (sender, args) { dialog.show(10, 10)})

</script>

After executing the example, clicking the Open dialog button opens the following dialog box:

See also:

Dialog