DEFINE CLASS AddableButton AS BUTTON cClickCodeBlock = NULL PROCEDURE CLICK IF VARTYPE( THIS.cClickCodeBlock) = "C" = CodeBlock( THIS.cClickCodeBlock) ENDIF ENDPROCThen, even though you can add a method after the fact, this class allows you to add code as a *property*. Requires of course that you have CodeBlock (available here) in your project.