setHint(range: PP.Ui.TabSheetRange, hint: String);
range. Table cell range, for which a tooltip is to be set.
hint. Tooltip text.
The setHint method changes tooltips set for a table cell range.
To execute the example, the HTML page must contain the TabSheet component named tabSheet (see Example of Creating the TabSheet Component). Set a tooltip for the range under coordinates (0, 0)-(1,0) and process the HintChanged event while showing the list of range cells:
// Process the HintChanged event
tabSheet.HintChanged.add(function (sender, eventArgs) {
// Get table model
var model = tabSheet.getModel();
// Get all table cells
var cells = model.getCells();
console.log("Cells in the range:");
var coord;
for (var i in cells) {
for (var j in cells[i]) {
// Check the cells that have commentary
if (cells[i][j].getHint()) {
coord = cells[i][j].getCoord()
console.log("(" + coord.colIndex + ", " + coord.rowIndex + ") ");
}
}
}
});
// Get a cell range by the specified coordinates
var range = tabSheet.getRange(0, 0, 0, 1);
// Select range
range.select();
// Get range coordinates
var tlCoord = range.getCorners().tlCoord;
var brCoord = range.getCorners().brCoord;
// Setting a tooltip for the selected range cells
tabSheet.setHint(range, "(" + tlCoord.rowIndex + ", " + tlCoord.colIndex + ")-(" + brCoord.rowIndex + ", " + brCoord.colIndex + ")");
After executing the example a comment that contains values of range coordinates (0, 0)-(1,0) is set for the cell range:

On processing the HintChanged event the browser console shows the list of coordinates in the range, for which the tooltip is set:
Cells within the range:
(0, 0)
(0, 1)
See also: