CustomTkinter icon indicating copy to clipboard operation
CustomTkinter copied to clipboard

get state of progressbar

Open svn-josh opened this issue 2 years ago • 4 comments

is there a way to check if the progress bar is already running?

i am using mode='indeterminate' so i cant get the current value to check if it is > 0 how do i check it then? can we get a function for this?

svn-josh avatar Jan 10 '23 09:01 svn-josh

@GermanYoshi Use progressbar.cget("mode") to get the current mode.

Akascape avatar Jan 10 '23 12:01 Akascape

sorry my question was a bit inaccurate. how do i see if the progressbar is in state progressbar.start() or .stop()

svn-josh avatar Jan 10 '23 12:01 svn-josh

You can go to "widgets -> ctk_progressbar.py" and jump to cget method then add this

elif attribute_name == "loop_running":
    return self._loop_running

then use progressbar.cget("loop_running")

M4hbod avatar Jan 10 '23 14:01 M4hbod

@GermanYoshi @M4hbod Or you can directly use progressbar._loop_running instead of doing changes in the module.

Akascape avatar Jan 10 '23 15:01 Akascape

thanks

svn-josh avatar Oct 31 '23 11:10 svn-josh