Hi Jonathan--
Sure, you can do this using dlgitem_set() to toggle the "ACTIVE"
attribute, like this:
function updateToolbar() {
local button_id = "Toolbar_AccessService"; # modify as necessary
for your toolbar button ID
if (serviceIsAvailable()) {
# good to go, make the button available
dlgitem_set(current_window(),$button_id ,"ACTIVE",1);
}
else {
# something's wrong, so disable the button
dlgitem_set(current_window(),$button_id ,"ACTIVE",0)
}
}
--Clay
Clay Helberg
Senior Consultant
TerraXML
1380 Forest Park Circle, Suite 100
Lafayette, CO 80027