Python‎ > ‎tkinter‎ > ‎

tkinter.NW


Definition
The anchor value declared equal to 'NW' how to place the grid within the master when no row/column has any weight.

Syntax
  • tkinter.NW
  • NW
Examples
The message widget are placed using anchor method.
 from tkinter import*

master=Tk()

message_s=Message(master, text="N")
message_s.pack(anchor=N)

message_NE=Message(master, text="NE")
message_NE.pack(anchor=NE)

message_NW=Message(master, text="NW")
message_NW.pack(anchor=NW)

message_E=Message(master, text="E")
message_E.pack(anchor=E)

message_NE=Message(master, text="W")
message_NE.pack(anchor=W)

message_SE=Message(master, text="SE")
message_SE.pack(anchor=SE)

message_SW=Message(master, text="SW")
message_SW.pack(anchor=SW)

message_s=Message(master, text="S")
message_s.pack(anchor=S)

master.mainloop()





Comments