how to enable/disable a button in application code?

Hi Folks,

Do you know how to do this? It’s very simple in VB, but I don’t know how to do it here.

Thanks!

change the Pt_ARG_FLAGS resource for the button and set pt_GHOST and Pt_BLOCKED. This will make the button grayout and won’t call the callback when it is pressed.

Matthew’s answer is the correct and normal way to do this. You can also 1) unrealize the button, and it will dissappear, 2) put in a software switch so that when the callback is called you just ignore it, 3) remove the callback, if you so choose.