28.10.2021 Views

Python Tutorial ( PDFDrive )

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• "heart"

• "heart"

• "man"

• "mouse"

• "pirate"

• "plus"

• "shuttle"

• "sizing"

• "spider"

• "spraycan"

• "star"

• "target"

• "tcross"

• "trek"

• "watch"

Example:

Try the following example by moving cursor on different buttons:

from Tkinter import *

import Tkinter

top = Tkinter.Tk()

B1 = Tkinter.Button(top, text ="circle", relief=RAISED,\

cursor="circle")

B2 = Tkinter.Button(top, text ="plus", relief=RAISED,\

cursor="plus")

B1.pack()

B2.pack()

top.mainloop()

Geometry Management:

All Tkinter widgets have access to specific geometry management methods, which have the purpose of

organizing widgets throughout the parent widget area. Tkinter exposes the following geometry manager classes:

pack, grid and place.

TUTORIALS POINT

Simply Easy Learning

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!