OpenLayers.Control.Button with displayClass

Hello Developers,

this might be an easy question but i dont found it on this forum so here i go:

i created a button with a function:

new OpenLayers.Control.Button({ 
              trigger: function() {  
                  if( == null) {
             = new OpenLayers.Handler.Box(control, {"done": notice}); 
                  if(!activated) {
                      activated =;
                  } else {
                      activated = false;
               displayClass: "MyTest"

But on click on this button it wont change the icon.

the initial load is with the inactive icon, which is correct, but on click it should change to active icon, defined the same way.

This display class worked fine, when it changes a draw feature, for example:

new OpenLayers.Control.DrawFeature(layer,
        {'displayClass': 'MyTest'}),

My Question is, why does it not work on buttons?

And, if its just not supported by buttons, how can i call my own function out of a toolbar but with full optical support like the “inactive-active” thing?

Sorry for my bad english.