Create widgetcode