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()
2
  • We can't help much without seeing your code. And is this diagram what you're trying to achieve, or what you're code currently does but you want to change? Commented Feb 6, 2015 at 5:48
  • @skrrgwasme, code added already Commented Feb 6, 2015 at 5:49

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.