Qwerty said:
Quote:

You need to do it at runtime: use the sclick event to watch for tab clicks and the /did -t command to dynamically set the default button.


so test with this
Code:

alias list dialog -m list list

dialog list {
  title "List Box"
  size -1 -1 200 100
  option dbu
  tab "One", 1, 0 0 200 100
  tab "Two", 2
  list 100, 20 20 160 60, tab 1
  button "Add", 900, 30 75 60 10, tab 1
  button "Remove", 901, 110 75 60 10, tab 1
  list 101, 20 20 160 60, tab 2
  button "Add", 902, 30 75 60 10, tab 2
  button "Remove", 903, 110 75 60 10, tab 2
}
on *:dialog:list:init:0:{
  did -b list 901,903
}
on *:dialog:list:sclick:1:{
  did -t list 100 1
}
on *:dialog:list:sclick:2:{
  did -t list 101 1
}
on *:dialog:list:sclick:900:{
  if ($cb(0)) { 
    did -a list 100 $cb 
    did -e list 901 
  }
}  
on *:dialog:list:sclick:901:{
  did -d list 100 $did(list,100).sel
  if (!$did(list,100).lines) { did -b list 901 }
}

on *:dialog:list:sclick:902:{
  if ($cb(0)) { 
    did -a list 101 $cb 
    did -e list 903 
  }
}  
on *:dialog:list:sclick:903:{
  did -d list 101 $did(list,101).sel
  if (!$did(list,101).lines) { did -b list 903 }
}