# Numbers Script

global telephone_number
set w .redialist
catch {destroy $w}
toplevel $w
wm title $w "G53UID 123..."
wm iconname $w "123..."

frame $w.fnum0
frame $w.fnum0.maintitles
frame $w.fnum0.selections 
frame $w.fnum0.selections.last 
frame $w.fnum0.systembuttons

pack $w.fnum0
pack $w.fnum0.maintitles -side top
pack $w.fnum0.selections -side top
pack $w.fnum0.selections.last
pack $w.fnum0.systembuttons -side bottom -fill x
label $w.fnum0.maintitles.em_label -text "Last 4 Numbers" -width 25

button $w.fnum0.systembuttons.closebook -text "Close" -command "destroy $w"
button $w.fnum0.systembuttons.dial -text "DIAL" -command "notimpl_proc $w"

pack $w.fnum0.systembuttons.dial $w.fnum0.systembuttons.closebook -side right
pack $w.fnum0.maintitles.em_label 

# Last 4 Numbers ---------------------
scrollbar $w.fnum0.selections.last.em_scroll -command "$w.fnum0.selections.last.em_listbox yview"
listbox $w.fnum0.selections.last.em_listbox -yscroll "$w.fnum0.selections.last.em_scroll set" -setgrid 1 -height 4 -background "skyblue3"

pack $w.fnum0.selections.last.em_scroll -side right -fill y
pack $w.fnum0.selections.last.em_listbox -side left -expand 1 

#would be read in from user file
$w.fnum0.selections.last.em_listbox insert 0 \
	"Number 4" \
	"Number 3" \
	"Number 2 " \
	"Number 1" \


proc notimpl_proc {w} {
	tk_messageBox -icon warning -message "Feature not implemented" \
	 -type ok -title "G5BUID Phone Interface - Message box" -parent $w
}

