Bitmap Button in python tkinter


Bitmap represents a pixel of the image. A Bitmap is a file format or memory organization of rows and columns of bits (or pixels) that collectively display a graphical representation. Most graphic images contain thousands of bits. Also called a bit array, Bitmap index, raster image, and sometimes pixmap, a bitmap is a domain and range of bits that present
a rectangular visual made up of pixels. A Bitmap is a type of memory organization or image file format used to store digital images.

 

TYPES OF BITMAP FILE FORMATS

BMP: Bitmap
GIF: Graphics Interchange Format
JPEG: Joint Photographic Expert Group
EXIF: Exchangeable Image File
PNG: Portable Network Graphics 
TIFF: Tagged Image File Format


******Your code Below*****

from tkinter import *

root = Tk()
root.title("Button Bitmap")
root.geometry("800x600+450+86")

btn1= Button(root, text="NW",bitmap="error")
btn2= Button(root, text="N",bitmap="gray75")
btn3= Button(root, text="N",bitmap="gray50")
btn4= Button(root, text="N",bitmap="gray25")
btn5= Button(root, text="N",bitmap="gray12")
btn6= Button(root, text="N",bitmap="hourglass")
btn7= Button(root, text="N",bitmap="info")

btn1.pack(pady=2)
btn2.pack(pady=2)
btn3.pack(pady=2)
btn4.pack(pady=2)
btn5.pack(pady=2)
btn6.pack(pady=2)
btn7.pack(pady=2)

root.mainloop()

********End Code**********

Write Down Code Your Code Editor. To show Your Output. If Use Pycharm Press Shift+F10 and Show Your Output.




Enjoy..............


If You Want To Learn More Plz Visit www.newpost24.com

If You Find Specific link plz Follow This Page.

Post a Comment

أحدث أقدم