Width Height Fill Expand Weight Weight: Scrollbar: Import As
Width Height Fill Expand Weight Weight: Scrollbar: Import As
Width Height Fill Expand Weight Weight: Scrollbar: Import As
import tkinter as tk
root = tk.Tk()
root.mainloop()
ListScrollbar:
from tkinter import *
root = Tk()
scrollbar = Scrollbar(root)
#scrollbar should stretch to fill any extra space in the y axis ( fill="y" )
scrollbar.pack( side = RIGHT, fill = Y )
#To connect a vertical scrollbar to such a widget, you have to do two things:
#Set the widget’s yscrollcommand callbacks to the set method of the scrollbar.
mainloop()
Listbox:
from tkinter import *
root = Tk()
scrollbar = Scrollbar(root)
#scrollbar should stretch to fill any extra space in the y axis ( fill="y" )
scrollbar.pack( side = RIGHT, fill = Y )
#To connect a vertical scrollbar to such a widget, you have to do two things:
1
#Set the widget’s yscrollcommand callbacks to the set method of the scrollbar.
mainloop()
Relief :
from tkinter import *
import tkinter
top = Tk()
B1.pack()
B2.pack()
B3.pack()
B4.pack()
B5.pack()
top.mainloop()