ListCaption.getOptimalWidth

Syntax

getOptimalWidth() : Number;

Description

The getOptimalWidth method returns optimal title width, at which the entire title text is visible.

Example

Executing the example requires the SimpleTreeList component with the Tree identifier (see Example of Creating the SimpleTreeList Component).

// Get title
caps = Tree.getCaptions();
cap = caps.getCaptions()[0];
// Get optimal width
cap.getOptimalWidth();
-> 30

After executing the example optimal width of the first title is obtained.

See also:

ListCaption