IsHint: Boolean
The IsHint property determines tooltip layout on voering the mouse over the background image of the text box.
Available values:
true. On hovering the mouse cursor over the background image the tooltip is shown (default).
false. On hovering the mouse cursor over the background image the tooltip is not shown.
Use JSON or the setIsHint method to set the property value and the getIsHint method to get the property value.
To execute the example, the HTML page must contain links to PP.js script file and to PP.css styles file, in the <body> tag of the HTML page of the <div> item with the textBox identifier. Create text box and implement handlers of the ImageMouseOut and ImageMouseOver events:
function createTextBox() { // Create a text box textBox = new PP.Ui.TextBox({ // Set parent item ParentNode: document.getElementById("textBox"), // Set contents of the text box Content: "Text", // Set path to the background image ImageUrl: "../build/img/angles.png", // Set width and height of the background image ImageHeight: 32, ImageWidth: 32, // Add a CSS class to the background image of the text box UseImageClass: "MyImageClass", // Set the attribute that tooltip is visible on hovering the cursor over the background image IsHint: true, // Set event handler of the mouse cursor appearance over the background image of the text box ImageMouseOver: function (sender, args) { console.log("Cursor is over the background image"); }, // Set event handler of the mouse cursor out of the background image of the text box ImageMouseOut: function (sender, args) { console.log("Cursor is out of the background image"); } }); }
Hover the mouse cursor over the background image. As a result a tooltip is displayed:
The console displays the message informing that cursor is over the background image:
Cursor is over the background image
When the cursor is out of the background image, the following message is displayed in the console:
Cursor is out of the background image
See also: