Set two buttons with the same location and size, one the Enable text, the other with the Disable text, then based on the your example
dialog new_table {
title "New Project"
size -1 -1 335 160
option dbu
button "Enable", 1, 5 5 35 12
button "Disable", 2, 5 5 35 12
}
on *:dialog:new_table :init:*:{
if $group(#bla).status && !$timer(bla) {
did -ev $dname 2
did -bh $dname 1
}
else {
did -ev $dname 1
did -bh $dname 2
}
}