User Activity

I have created an array of flex buttons in my user code for which I set attributes like text and border in the screenview.cpp file. I want the button to call a virtual function when clicked, how do I do that.