HOME/Articles/

tkinter example grid (snippet)

Article Outline

Python tkinter (gui) example 'grid'

Modules used in program:

  • import Tkinter

grid

Python tkinter example: grid

import Tkinter
root = Tkinter.Tk(  )
for r in range(3):
   for c in range(4):
      Tkinter.Label(root, text='Row%s/Column%s'%(r,c),fg="red",
         padx=5,pady=5 ).grid(row=r,column=c)
root.mainloop( )