He, i am strugeling whit a problem ,
i wannel call the ok restrasion botten.
but it don't show on the screen. of form

i gows over this pies of code in the program.

    btn_ok_REG = Button(root_reg, height=1, width=7, text='Login')
    btn_ok_REG.pack()
    btn_ok_REG.place(x= 100 , y=50)


#!/urs/bin/evn python
from tkinter import *
root = Tk()
root.title("Main Form")
root.geometry("640x480")

def helloBack():
   msg = messagebox.showinfo( "Hello Python")

def registrastie():
    root_reg = Tk()
    root_reg.title("Registrasie")
    root_reg.geometry("400x400")

    btn_ok = Button (root_reg ,command=helloBack, height=1, width=7, text='Login')

    label_text_name = Label(root_reg, text="name : ")
    label_text_name.place(x= 101, y=50)
    label_text_userid = Label(root_reg, text="userid : ")
    label_text_userid.place(x=100, y=80)
    label_text_token = Label(root_reg, text="Paswoord : " )
    label_text_token.place(x=80, y=110)
    btn_ok_REG = Button(root_reg, height=1, width=7, text='Login')
    btn_ok_REG.pack()
    btn_ok_REG.place(x= 100 , y=50)

    lbn_name= Entry(root_reg, width=30 )
    lbn_name.place(x=150, y=50)

    lbn_userid= Entry(root_reg, width=30 )
    lbn_userid.place(x=150, y=80)
    lbn_token= Entry(root_reg, width=30 )
    lbn_token.place(x=150, y=110)

def login():
    root_login = Tk()
    root_login.title("Login")
    root_login.geometry("400x400")
    label_text_login = Label(root_login, text="User ID : ")
    label_text_login.place(x= 114, y=50)
    label_text_token = Label(root_login, text="Paswoord :")
    label_text_token.place(x= 100, y=80)
    lbn_name= Entry(root_login, width=30 )
    lbn_name.place(x=160, y=50)
    lbn_userid= Entry(root_login, width=30 )
    lbn_userid.place(x=160, y=80)
# login
btn_number_one = Button (root ,command=login, height=1, width=7, text='Login')
btn_number_one.pack()
btn_number_one.place(x= 100 , y=50)

# Registratie
btn_number_one = Button (root ,command=registrastie, height=1, width=7, text='Registratie')
btn_number_one.pack()
btn_number_one.place(x= 200 , y=50)

root.mainloop()
root_reg.mainloop()
root_login.mainloop()

First, don't use pack() and place(). How is Tkinter to know which one to apply to the widget. Don't start multiple instances of Tk(). Same thing. How is Tkinter supposed to know which one you are referring to. Use a Toplevel() instead. This modified code does what I think you want.

from tkinter import *
root = Tk()
root.title("Main Form")
root.geometry("640x480")

def helloBack():
   msg = messagebox.showinfo( "Hello Python")

def registrastie():
    root_reg = Toplevel()
    root_reg.title("Registrasie")
    root_reg.geometry("400x400")

    btn_ok = Button (root_reg ,command=helloBack, height=1, width=7, text='Login')

    label_text_name = Label(root_reg, text="name : ")
    label_text_name.place(x= 101, y=50)
    label_text_userid = Label(root_reg, text="userid : ")
    label_text_userid.place(x=100, y=80)
    label_text_token = Label(root_reg, text="Paswoord : " )
    label_text_token.place(x=80, y=110)
    btn_ok_REG = Button(root_reg, height=1, width=7, text='Login')
##    btn_ok_REG.pack()
    btn_ok_REG.place(x= 100 , y=50)


    lbn_name= Entry(root_reg, width=30 )
    lbn_name.place(x=150, y=50)

    lbn_userid= Entry(root_reg, width=30 )
    lbn_userid.place(x=150, y=80)
    lbn_token= Entry(root_reg, width=30 )
    lbn_token.place(x=150, y=110)

def login():
    root_login = Toplevel()
    root_login.title("Login")
    root_login.geometry("400x400")
    label_text_login = Label(root_login, text="User ID : ")
    label_text_login.place(x= 114, y=50)
    label_text_token = Label(root_login, text="Paswoord :")
    label_text_token.place(x= 100, y=80)
    lbn_name= Entry(root_login, width=30 )
    lbn_name.place(x=160, y=50)
    lbn_userid= Entry(root_login, width=30 )
    lbn_userid.place(x=160, y=80)
# login
btn_number_one = Button (root ,command=login, height=1, width=7, text='Login')
##btn_number_one.pack()
btn_number_one.place(x= 100 , y=50)

# Registratie
btn_number_one = Button (root ,command=registrastie, height=1, width=7, text='Registratie')
##btn_number_one.pack()
btn_number_one.place(x= 200 , y=50)

root.mainloop()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.