TextBox.ControlButton

Syntax

ControlButton: PP.Ui.Button

Description

The ControlButton property determines a button to be used to manage text box.

Comments

Use JSON or the setControlButton method to set the property value, and the getControlButton method to get the property value.

Value of the property is an instance of the PP.Ui.Button class or a JSON object with the PPType property set to PP.Ui.Button.

Example

To execute the example, the page must contain the TextBox component named textBox (see Example of creating the TextBox component). Create and set a button used to manage text box, enable text box editing, next change and select content of this box:

// Create a new button
var button = new PP.Ui.Button({
    Width: 20, // Button width
    Height: 20 // Button height
});
// Enable text box editing 
textBox.setEnableEdit(true);
// Set control
textBox.setControlButton(button);
// Set focus on the text box
textBox.setFocus();
// Set text contents of the text box
textBox.setContent("Text box");
// Highlight the text
textBox.selectAll();

After the example execution, a button for text box managing is created, next content of this text box is changed and selected:

See also:

TextBox