I'm making a tkinter gui with python,but its not proper,When i click on Activate it should open a new box prompting user for Username and Pass,but there is some error;I have defined the problem below
Here is the code I am using:
import Tkinter
import tkMessageBox
from ttk import *
from Tkinter import *
root = Tk()
top = Tk()
def helloCallBack():
top.title("Activation")
Label(top, text="Username").grid(row=0, sticky=W, padx=4)
Entry(top).grid(row=0, column=1, sticky=E, pady=4)
Label(top, text="Pass").grid(row=1, sticky=W, padx=4)
Entry(top).grid(row=1, column=1, sticky=E, pady=4)
Button(top, text="Submit").grid(row=2, column=1)
B = Tkinter.Button(text ="Activate", command = helloCallBack)
B.pack()
root.mainloop()
top.mainloop()
So the output that I'm getting is ;

And when i click on activate:

Two problems here
1.There is a blank box behind the root box when i run the program,how do i get rid of that?
2.The first message box(root) does not get deleted when i click on activate