I actually tried this but it doesn't work, setting the focus has no effect on the dialog closing when the user presses the enter key. Below is a simplified sample of the code I am using as you can see I set the focus on the Look-up button but if the user presses their enter key the dialog closes.

Code:
alias WTFB { 
  dialog -m WTFB WTFB
}

dialog WTFB {
  title "TEST"
  size -1 -1 163 175
  option dbu
  combo 1, 4 41 91 132, size
  button "Look Up", 2, 96 41 62 12
  text "Select the Word from the word list.", 3, 101 58 57 78
  text "Choose a word", 4, 5 31 45 8
  button "Exit", 5, 110 152 37 12, ok
  button "A", 10, 21 8 9 9
  button "B", 16, 30 8 9 9
  button "C", 17, 39 8 9 9
  button "D", 18, 48 8 9 9
  button "E", 19, 57 8 9 9
  button "F", 20, 66 8 9 9
  button "G", 21, 75 8 9 9
  button "H", 22, 84 8 9 9
  button "I", 23, 93 8 9 9
  button "J", 24, 102 8 9 9
  button "K", 25, 111 8 9 9
  button "L", 26, 120 8 9 9
  button "M", 27, 129 8 9 9
  button "N", 28, 21 20 9 9
  button "O", 29, 30 20 9 9
  button "P", 30, 39 20 9 9
  button "Q", 31, 48 20 9 9
  button "R", 32, 57 20 9 9
  button "S", 33, 66 20 9 9
  button "T", 34, 75 20 9 9
  button "U", 35, 84 20 9 9
  button "V", 36, 93 20 9 9
  button "W", 37, 102 20 9 9
  button "XYZ", 38, 111 20 27 9
  text "Choose First Letter", 41, 5 0 60 8
}

on *:dialog:WTFB:SCLICK:*:{
  if ($did == 10) { set %wtb_flet A  | /echo -a test }
  elseif ($did == 16) { set %wtb_flet B  | /echo -a Test }
  elseif ($did == 17) { set %wtb_flet C  | /echo -a Test }
  elseif ($did == 18) { set %wtb_flet D  | /echo -a Test }
  elseif ($did == 19) { set %wtb_flet E  | /echo -a Test }
  elseif ($did == 20) { set %wtb_flet F  | /echo -a Test }
  elseif ($did == 21) { set %wtb_flet G  | /echo -a Test }
  elseif ($did == 22) { set %wtb_flet H  | /echo -a Test }
  elseif ($did == 23) { set %wtb_flet I  | /echo -a Test }
  elseif ($did == 24) { set %wtb_flet J  | /echo -a Test }
  elseif ($did == 25) { set %wtb_flet K  | /echo -a Test }
  elseif ($did == 26) { set %wtb_flet L  | /echo -a Test }
  elseif ($did == 27) { set %wtb_flet M  | /echo -a Test }
  elseif ($did == 28) { set %wtb_flet N  | /echo -a Test }
  elseif ($did == 29) { set %wtb_flet O | /echo -a Test }
  elseif ($did == 30) { set %wtb_flet P | /echo -a Test }
  elseif ($did == 31) { set %wtb_flet Q | /echo -a Test }
  elseif ($did == 32) { set %wtb_flet R | /echo -a Test }
  elseif ($did == 33) { set %wtb_flet S | /echo -a Test }
  elseif ($did == 34) { set %wtb_flet T | /echo -a Test }
  elseif ($did == 35) { set %wtb_flet U | /echo -a Test }
  elseif ($did == 36) { set %wtb_flet V | /echo -a Test }
  elseif ($did == 37) { set %wtb_flet W | /echo -a Test }
  elseif ($did == 38) { set %wtb_flet XYZ | /echo -a Test }

}

on *:dialog:WTFB:init:0: {
  did -f $dname 2
}

Last edited by LittleJohn; 11/01/11 02:06 AM.