@Bradluffy have a look at the example I’ve uploaded on the Airdev Widgets page.
I hope it gives you some ideas.