Progress bar (determinate mode)
Progress bar
widget allows you to give feedback to the user about the progress of a
long-running task.The purpose of this widget is to reassure the user
that something is happening.
-->used in loading or downloading types of process.
-->useful to display the status of an operation or task.
-->can indicate the evolution of a certain process(example downloading a file from the Internet).
-->represent that an operation is being executed. Remaining time is unknown.
The progress bar executes in two modes:-
1) Determinate mode
2) Indeterminate mode
Determinate mode
In the determinate mode, the progress bar shows
an indicator from the beginning to the end of the widget. If you know
how to measure relative progress, you can use the determinate mode.
Example:
**********Your code Below (determinate mode)*********
from tkinter import *
from tkinter import ttk
root = Tk()
root.title("Progress bar determinate mode")
root.config(background="#FFF8DC")
root.geometry("700x300+580+86")
lbl= Label(root,text="Progress Bar",font=("Times", 30, "bold"))
lbl.pack(pady=20)
my_progress_bar = ttk.Progressbar(root, orient=HORIZONTAL,length=600, mode='determinate')
my_progress_bar.pack(pady=30)
my_progress_bar.start()
root.mainloop()
********End Code**********
Write Down Code Your Code Editor. To show Your Output. If Use Pycharm Press Shift+F10 and Show Your Output.
إرسال تعليق