The following code was used to create the widget above: