Best way to set a toolbarbutton attribute

0 views
Skip to first unread message

Sailfish

unread,
Jan 29, 2006, 2:53:14 PM1/29/06
to
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)?

TIA

--

Mozilla Tips: http://www.ufaq.org/ , http://ilias.ca/
About Mozilla: http://www.mozilla.com/
Mozilla Themes: http://www.projectit.com/freestuff.html

Reply all
Reply to author
Forward
0 new messages