Create widget with callback functionality

Hi all,

I have managed to create widgets at runtime using the PtCreateWidget function but I would now like to know how I can create widgets that have callback functionality in them?

For example I might want to create a new button that runs some code when it is clicked on!

Any advice appricated, example code would be great.

Kind regards
Chris

I have found the answer already guys.

If anyone is interested read about the PtAddCallback(s) functions.

Cheers

See also the Managing Widgets in Application Code chapter of the Photon Programmer’s Guide.