0

I'm facing a problem using TKinter via PyCharm. The button placing keeps on running.

I've tried grid and pack yet no luck. Even row , anchor but i keep getting different results.

Keep on failing

jay = Tk()
jay.title("Awesome Software")
jay.geometry("720x560")

searchbutton = Button(jay, text="Setting")
searchbutton.pack(side=TOP)

stopbutton = Button(jay, text="Stop")
stopbutton.pack(side=TOP)

setbutton = Button(jay, text="Search")
setbutton.pack(side=TOP)

mainloop()
FreedomPride
  • 1,098
  • 1
  • 7
  • 30

1 Answers1

1

Found it ,

jay = Tk()
jay.title("Awesome Software")
jay.geometry("720x560")

but_frame = Frame(jay)
searchbutton = Button(but_frame, text="Search")
searchbutton.pack(side=TOP, padx=20,pady=10)

stopbutton = Button(but_frame, text="Stop")
stopbutton.pack(side=TOP,pady=10)

setbutton = Button(but_frame, text="Settings")
setbutton.pack(side=TOP,pady=10)

but_frame.pack(side=LEFT)

mainloop()

Build a frame then do it

FreedomPride
  • 1,098
  • 1
  • 7
  • 30