.as() method for widgets