Best way to set a toolbarbutton attribute

Skip to first unread message


Jan 29, 2006, 2:53:14 PM1/29/06
I'm creating an extension that adds a toolbarbutton to the browser. I
want the button to have a "disabled" attribute that I can then use a CSS
selector to style a disabled button image. The disabled condition will
be based on the quantity of a list of items, when the list is empty then
the disabled attribute should be set.

The problem I'm having is understanding the most efficient way of doing
this without consuming too many cpu cycles constantly checking the list.
Is there a preferred "listener" event in which to make the list check?
If so, can someone provide some psuedo-XUL code that would do the
trick (or point me to a reference source)?



Mozilla Tips: ,
About Mozilla:
Mozilla Themes:

Reply all
Reply to author
0 new messages