use lock/unlock while setting up the widget, to prevent redraws