Startdrag and stop drag with button

i want to use a button to temporarily disable startdrag and drop and then enable it again with the same button. how do i do this?