#
# Module for browsing around in Misc widgets
#


# Brings up an entry for goto operation, then calls appropriate goto proc.
proc th_goto {w} {
  if {[set f [th_show_entry $w goto]] == ""} {bell ; return}
  $f.l configure -text "Goto:"
  th_bind $f.e OK "th_hide_entry $w goto ; th_[winfo class $w]_goto $w \"\[$f.e get\]\""
}


# Args are parameters to move widget w. (like "xview scroll 1 pages")
proc th_scroll {w args} {
  set view [lindex $args 0]
  set i [$w $view]
  eval $w $args
  if {[$w $view] == $i} {bell ; return 0}
}
