Hiding a progressbar in tkinter
On Wed, 26 Jun 2019 17:47:39 +0200, Cecil Westerhof wrote:
> I just started with GUI stuff in tkinter. I have a progressbar, but I
> want it to be only visible when it is used. So I tried the following:
> window = Tk()
> frame = Frame(window)
> frame.pack(side = "top", fill = "both", expand = True)
> Button(window, text = button_str, command = select_dir).pack()
> progress = ttk.Progressbar(window, orient = "horizontal", length = 200,
> mode = "determinate")
> But that does not hide the progressbar. What am I doing wrong?
> I could use pack_forget, but that will change the dimensions of the
Here is an example using grid_forget().
Disclaimer: I have not tested this code and cannot say for certain
that it will work the way you want.
<Wildman> GNU/Linux user #557453
"Be vewy vewy qwiwet, I'm hunting wabbits."