Hi Brett,
>I have a screen that contains a page frame. Depending on the data that is read, the page frame adjusts the number of pages it contains (pagecount). When a new page is added I would like to add some code to the activate method of the page. How do I do this inside a program on the fly. TIA
You may have to define your page class in code (with the assumed mehtods), and then add that to the class:
thisform.pageframe1.addobject('Page'+allt(str(thisform.pageframe1.pagecount+1)), 'pgActivate')
define class pgActivate as page
function Activate
debugout this.name
endfun
enddefine
How's this help?