0

in this example why the text does not stick to the left...

I also tried to pack them in a different way but without success...

some help please?

import tkinter
import tkinter.ttk

window = tkinter.Tk()

window.geometry("400x200")


frame0 = tkinter.ttk.Frame(window)
frame01 = tkinter.ttk.Frame(frame0)
frame02 = tkinter.ttk.Frame(frame0)


frame0.grid(row=0, column=0)
frame01.grid(row=1, column=0)
frame02.grid(row=2, column=0)


btn1 = tkinter.ttk.Button(frame01, text="btn1")
btn2= tkinter.ttk.Button(frame01, text="btn2")

btn1.grid(row=0, column=0)
btn2.grid(row=0, column=1)

label = tkinter.ttk.Label(frame02, text="text")

label.grid(row=0,column=0, sticky="w")

window.mainloop()
Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685

1 Answers1

0

oh ..I should stick it from the frame lol...

frame02.grid(row=2, column=0, sticky="w")
Paul Roub
  • 36,322
  • 27
  • 84
  • 93
  • Please use the edit link on your question to add additional information. The Post Answer button should be used only for complete answers to the question. - [From Review](/review/low-quality-posts/26619961) – Mehrdad Pedramfar Jul 08 '20 at 15:32
  • Why you think it's not a complete answer ? –  Jul 08 '20 at 17:59