updated example to show a button from code