1

Please help me.

In the code below, text box and other labels got placed before execution of the functions forcedefiner() and resultantCalc():

def Resultant():
    
    L = tk.Label(w,text="Enter the number of forces :",fg="black",font="none 20")
    L.place(x=150,y=200)
    enter = tk.Entry(font="none 20")
    enter.place(x=500,y=200,width=100)
    def submit():
        n=int(enter.get())
        enter.destroy()
        L.destroy()
        
        
        SB.destroy()
        F=forceDefiner(n)
        R=resultantCalc(F,n)

        #here is the issue

        UB.place(x=300,y=400,width=200,height=75)
        L1.place(x=150,y=50)
        RB.place(x=300,y=200,width=200,height=75)
        EB.place(x=300,y=300,width=200,height=75)
        Output.delete(0.0,tk.END)
        Output.insert(tk.END,"Magnitude of Resultant = {} \nAngle of the Resultant = {}".format(R.f,R.a))
        
        

    SB = tk.Button(w,text="SUBMIT",bg="blue",fg="white",font="none 18",command= submit )
    SB.place(x=300,y=300,width=100)
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
master tj
  • 11
  • 1
  • 2
    How do you prove that those `place(...)` are executed before the two functions? Better provide [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). – acw1668 Dec 31 '20 at 03:32
  • This should answer your questions [https://stackoverflow.com/a/22467400/14903329](https://stackoverflow.com/a/22467400/14903329) – o.o Dec 31 '20 at 04:09
  • The code after `F=forceDefiner(n)` absolutely cannot execute or have any effect until that function returns. That is fundamental to how software works. – Bryan Oakley Dec 31 '20 at 05:11

0 Answers0