Code:
dialog Demitrix {
  title "Demitrix "
  size -1 -1 106 112
  option dbu
  edit "Enter your text here..", 1, 13 17 73 11
  button "Submit", 2, 9 65 37 12
  button "Clear", 3, 57 65 37 12
  button "OK", 4, 33 87 37 12
}

on *:dialog:Demitrix:sclick:*: {
  if ($did == 2) { msg $active $did(Demitrix,1) }
  if ($did == 3) { did -r Demitrix 1 }
  else { dialog -x Demitrix Demitrix }
}


You both beat me to it. mad