define a function for widget-create with common options
Merge pull request #8 from aki2o/widget-create-function

define a function for widget-create with common options