You can pass a function of this type
function foo()
or of this type
function foo( var button , PANEL *pan )
to the button

But you pass a function of this type
function foo( PANEL *pan )
to the button.
Maybe this dont work.

muffel