How to disable user input while dealing with buttons

how to disable user input while dealing with buttons

You would typically handle this in your web widget.

do you have any sample code for this