0

Im always on my project on tkinter and i have created a border function to create a rectangle with a specificate border, anyway my problem its my entry is behind my rectangle how can i change it ??

its is my code:

def SetBorder(event):
    Border(window, 120, 21, 20, bg_color_hex, border_color_hex, 3)

def NewProject():
    global window
    window = tk.Toplevel(frame)

    window.title("New Project")
    window.geometry("720x480")
    window.resizable(0, 0)
    window.config(bg=bg_color_hex)

    Project_Name_Label = Label(window, text="Project Name:")
    Project_Name_Label.place(x=15, y=20)
    Project_Name_Label.config(fg=text_color_hex, bg=bg_color_hex)

    global Project_Name_Entry
    Project_Name_Entry = Entry(window, width=20)
    Project_Name_Entry.config(bg=entry_color, bd=0, fg=text_color_hex)
    Project_Name_Entry.bind("<Button-1>", SetBorder)

    Project_Name_Entry.place(x=120, y=21)
Lucy
  • 27
  • 3
  • Your example is imcomplete, can't reproduce this, please make sure, code you posts actually behaves as you claim. You need probably either [`lift` or `lower`](http://effbot.org/tkinterbook/widget.htm#Tkinter.Widget.lift-method) – stovfl Mar 17 '20 at 14:56
  • ok thanks its working but i have another problem. I have a button who is open a "askdirectory" but i cant take the path becaus it is in a function. who i can do it ?? – Lucy Mar 17 '20 at 17:06
  • Read [how-can-i-use-the-output-from-tkfiledialog-askdirectory-to-fill-a-tkinter-entry](https://stackoverflow.com/questions/25282883) – stovfl Mar 17 '20 at 17:15
  • Ow thank you so much !! – Lucy Mar 17 '20 at 17:34

0 Answers0