Added support for switch widgets.