>Or even a more generic question would be... Is there a way to add code to a method at run-time?
For grid headers there's the simple way - bindevent() or having your own class instead of the empty baseclass header.
On the more generic side - it's possible to have your code generate a .prg with all of the Define Class code you want, compile it and then instantiate an object from that. Sounds like a complete overkill for a column header, but I can see some situations where that would actually save time. Imagine a class which has only one of a theoretically large number of combinations of properties, pieces of code etc. If you had a table with all the possible pieces of code and desired properties, then selected what you need from it, and then generated the .prg based on your selection, you'd have a class defined just the way you need it.