TextBox.ImageList

Syntax

ImageList: PP.ImageList

Description

The ImageList property determines text box sprite.

Comments

Use JSON or the setImageList method to set the property value, and the getImageList method to get the property value.

A specific background image can be selected using the ColImgIndex and RowImgIndex properties.

Example

After executing the example the page must contain the TextBox component named textBox (see Example of Creating the TextBox Component). A sprite named angles.png must be available at the build/img path. Set a new sprite and set a specific background image for text box:

// Determine an object to work with sprite
var imageList = new PP.ImageList({
    IconWidth: 30, // Icon width
    IconHeight: 30, // Icon height
    Source: "build/Img/angles.png" // Path to the sprite
});
// Set new sprite
textBox.setImageList(imageList);
// Set image from sprite at address (0,0)
textBox.setColImgIndex(0);
textBox.setRowImgIndex(0);

After executing the example a new background image is set from the sprite:

See also:

TextBox