0
import Tkinter
import ttk
def main():
  root = Tkinter.Tk()
  root.geometry("500x200")
  ft = ttk.Frame()
  ft.pack(expand=True, fill=Tkinter.BOTH, side=Tkinter.TOP)
  pb_hd = ttk.Progressbar(ft, orient='horizontal', mode='indeterminate')
  pb_hd.pack(expand=False, fill=Tkinter.BOTH, side=Tkinter.TOP)

  pb_hd.start(50)
  root.mainloop()
if __name__ == '__main__':
  main()

I want to add text inside the progress bar but not getting any idea how to do it?

gavisic
  • 1
  • 1
  • 4
  • 1
    You can accomplish this by [applying a tkinter style to your progressbar widget](https://stackoverflow.com/a/47902046/3994202). – Vincent Wetzel Feb 20 '20 at 09:29

1 Answers1

2

The ttk progressbar does not support a text option. You can create a label and pack it immediately above or below the widget.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685