Web | This Site

Python Basics
Python Advanced
Python Useful References
Python Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM

| Home |  | References |  | Discussion Forums |  | About TP

# Python - Tkinter Bitmaps

You would use this attribute to display a bitmap. There are following type of bitmaps available:

- "error"

- "gray75"

- "gray50"

- "gray25"

- "gray12"

- "hourglass"

- "info"

- "questhead"

- "question"

- "warning"

## Example:

    from Tkinter import *
    import Tkinter

    top = Tkinter.Tk()

    B1 = Tkinter.Button(top, text ="error", relief=RAISED,\
                             bitmap="error")
    B2 = Tkinter.Button(top, text ="hourglass", relief=RAISED,\
                             bitmap="hourglass")
    B3 = Tkinter.Button(top, text ="info", relief=RAISED,\
                             bitmap="info")
    B4 = Tkinter.Button(top, text ="question", relief=RAISED,\
                             bitmap="question")
    B5 = Tkinter.Button(top, text ="warning", relief=RAISED,\
                             bitmap="warning")
    B1.pack()
    B2.pack()
    B3.pack()
    B4.pack()
    B5.pack()
    top.mainloop()

This would produce following result:

Advertisement

Online Image Processing

Indian Baby Names