I am using the following code to display the title for my mozilla addon panel :
require('sdk/view/core').getActiveView(Pnael_Name).setAttribute('tooltip', 'aHTMLTooltip');
and it displays what is present in the title tag of my HTML
file.
But I want to modify the tooltip box
or cuztomize the height and width of the tooltip box
. How do I do that?
You are using tootltip
attribute wrong. You should create element with xul namespace, append it to the document (try appending it within the panel), make sure to set attribute of id on this panel you appended.
Then setAttribute('tooltip', 'id you set on that panel').
You can stylize and do whatever with that panel.
If you want to simply have a text tooltip then set the tooltiptext
attribute rather then tooltip
.
How to make a Firefox Extension URL Button show a string when hovered over