bevel buttons - dynamically change toggle on/off

as per title, is it possible to change the toggle on off by code ? I read the methods and propreitis of bevel buttons but coudlnt find out.
any ideas ? thanks regards

Example