diff --git a/PySimpleGUI.py b/PySimpleGUI.py index bb6899d2..4223d6db 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -2937,7 +2937,7 @@ def ConvertArgsToSingleString(*args): # ============================== ProgressMeter =====# # ===================================================# -def _ProgressMeter(title, max_value, *args, orientation=None, bar_color=(None,None), button_color=None, size=DEFAULT_PROGRESS_BAR_SIZE, scale=(None, None), border_width=None): +def _ProgressMeter(title, max_value, *args, orientation=None, bar_color=(None,None), button_color=None, size=DEFAULT_PROGRESS_BAR_SIZE, scale=(None, None), border_width=None, grab_anywhere=True): ''' Create and show a form on tbe caller's behalf. :param title: @@ -2954,7 +2954,7 @@ def _ProgressMeter(title, max_value, *args, orientation=None, bar_color=(None,No local_orientation = DEFAULT_METER_ORIENTATION if orientation is None else orientation local_border_width = DEFAULT_PROGRESS_BAR_BORDER_WIDTH if border_width is None else border_width bar2 = ProgressBar(max_value, orientation=local_orientation, size=size, bar_color=bar_color, scale=scale, border_width=local_border_width, relief=DEFAULT_PROGRESS_BAR_RELIEF) - form = FlexForm(title, auto_size_text=True, grab_anywhere=True) + form = FlexForm(title, auto_size_text=True, grab_anywhere=grab_anywhere) # Form using a horizontal bar if local_orientation[0].lower() == 'h': @@ -3128,7 +3128,7 @@ def EasyProgressMeterCancel(title, *args): _one_line_progress_meters = {} # ============================== OneLineProgressMeter =====# -def OneLineProgressMeter(title, current_value, max_value, key, *args, orientation=None, bar_color=(None,None), button_color=None, size=DEFAULT_PROGRESS_BAR_SIZE, scale=(None, None), border_width=None): +def OneLineProgressMeter(title, current_value, max_value, key, *args, orientation=None, bar_color=(None,None), button_color=None, size=DEFAULT_PROGRESS_BAR_SIZE, scale=(None, None), border_width=None, grab_anywhere=True): global _one_line_progress_meters @@ -3142,7 +3142,7 @@ def OneLineProgressMeter(title, current_value, max_value, key, *args, orientatio _one_line_progress_meters[key] = meter_data meter_data.ComputeProgressStats() message = "\n".join([line for line in meter_data.StatMessages]) - meter_data.MeterID, meter_data.MeterText= _ProgressMeter(title, int(max_value), message, *args, orientation=orientation, bar_color=bar_color, size=size, scale=scale, button_color=button_color, border_width=local_border_width) + meter_data.MeterID, meter_data.MeterText= _ProgressMeter(title, int(max_value), message, *args, orientation=orientation, bar_color=bar_color, size=size, scale=scale, button_color=button_color, border_width=local_border_width, grab_anywhere=grab_anywhere) meter_data.ParentForm = meter_data.MeterID.ParentForm return True diff --git a/docs/index.md b/docs/index.md index 906f418f..053c4553 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2154,6 +2154,7 @@ A MikeTheWatchGuy production... entirely responsible for this code.... unless it | 3.01.01 | Sept 10, 2018 - Menus! (sort of a big deal) | 3.01.02 | Step 11, 2018 - All Element.Update functions have a `disabled` parameter so they can be disabled. Renamed some parameters in Update function (sorry if I broke your code), fix for bug in Image.Update. Wasn't setting size correctly, changed grab_anywhere logic again,added grab anywhere option to PupupGetText (assumes disabled) | 3.02.00 | Sept 14, 2018 - New Table Element (Beta release), MsgBox removed entirely, font setting for InputText Element, **packing change** risky change that allows some Elements to be resized,removed command parameter from Menu Element, new function names for ReadNonBlocking (Finalize, PreRead), change to text element autosizing and wrapping (yet again), lots of parameter additions to Popup functions (colors, etc). +| 3.03.00 | New feature - One Line Progress Meters, new display_row_numbers for Table Element, fixed bug in EasyProgresssMeters (function will soon go away), OneLine and Easy progress meters set to grab anywhere but can be turned off. ### Release Notes diff --git a/readme.md b/readme.md index 906f418f..053c4553 100644 --- a/readme.md +++ b/readme.md @@ -2154,6 +2154,7 @@ A MikeTheWatchGuy production... entirely responsible for this code.... unless it | 3.01.01 | Sept 10, 2018 - Menus! (sort of a big deal) | 3.01.02 | Step 11, 2018 - All Element.Update functions have a `disabled` parameter so they can be disabled. Renamed some parameters in Update function (sorry if I broke your code), fix for bug in Image.Update. Wasn't setting size correctly, changed grab_anywhere logic again,added grab anywhere option to PupupGetText (assumes disabled) | 3.02.00 | Sept 14, 2018 - New Table Element (Beta release), MsgBox removed entirely, font setting for InputText Element, **packing change** risky change that allows some Elements to be resized,removed command parameter from Menu Element, new function names for ReadNonBlocking (Finalize, PreRead), change to text element autosizing and wrapping (yet again), lots of parameter additions to Popup functions (colors, etc). +| 3.03.00 | New feature - One Line Progress Meters, new display_row_numbers for Table Element, fixed bug in EasyProgresssMeters (function will soon go away), OneLine and Easy progress meters set to grab anywhere but can be turned off. ### Release Notes