Following Loc's idea...
dialog x {
size -1 -1 52 35
option dbu
tab "A", 1, 1 0 48 32
button "one", 3, 5 16 40 12, default tab 1
tab "B", 2
button "two", 4, 5 16 40 12, tab 2
}
On *:dialog:x:sclick:*:{
if $did == 1 { did -t x 3 }
elseif $did == 2 { did -t x 4 }
elseif $did == 3 || $did == 4 {
echo -a * Clicked button: $did
}
}