#!/afs/ece/usr/tcl/bin/wish -f

foreach pair {{get_widget aux/teach.tcl}} {
  if {[info procs [lindex $pair 0]] == ""} {
    source "[file dirname [info script]]/../[lindex $pair 1]"
}}


# Help text.
set Help "" ; append Help {Dialogth -- Add Keyboard Traversal to Tk's Dialog Box

This program adds numbers to Tk's dialog box. Now the 1 key picks the leftmost
button, the 2 key picks the next, and so on. The 0 key picks the default
button.


Widgets of Dialogth

The Teach Menu

  Dialog

Select the Dialog entry off the Teach menu, then click on a remote application
to teach it the new dialog procedure.

} $TH_Help {

Bugs / Limitations

None.
(I hope!)
}


proc teach_code {} {
  global TH_Dir App
  if {[send $App info procs tk_dialog] != ""} {
    do_cmd "rename tk_dialog {}\n" 0}
  include_files dialog.tcl
}


.buttons.teach.m add command -label "Dialog" -command {
	if {![get_widget]} {th_beep} else {teach_code}}
