I am trying to create a pop window that would ask someone to change a user's password. It displays everything, however, the problem is it displays it on the root window "." I would like it to display on the new window that pops up when the button is clicked. Anyone have any suggestions?
Code:
proc change_password {} {
global passwd passwd2
toplevel .passwd
label .lpasswd -text "Enter New Password:"
entry .epasswd -textvar passwd
label .lpasswd2 -text "Re-enter New Password:"
entry .epasswd2 -textvar passwd2
button .exit -text "Exit" -command { destroy .passwd }
pack .lpasswd .epasswd .lpasswd2 .epasswd2 .exit
}
button .change_pw -text "Change Password" -command { change_password }
pack .change_pw