diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 307bacf7..5ead13cb 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -1,5 +1,5 @@ #!/usr/bin/python3 -version = __version__ = "4.32.1.17 Unreleased\nRemoved faking timeout message as it can happen when autoclose used, CLOSE_ATTEMPED_EVENT, button_color can have a None parameter, fill_color added to draw_arc, 16x16 icon, Titlebar element, set_option gets custom titlebar option, tons of sh*t for custom titlebars, if running on Trinket then use custom titlebars by default, smarter titlebar handling..auto remove, added key to titlebar image, renamed InputText to Input, massive nngogol Union docstring fix!, finally custom titlebar minimize works on Linux and can also be pinned and made invisible, .visible added to all elements, dummy element.update so docstrings will be happier, custom titlebar global settings, custom titlebar window-level settings, spin fix in update by changing enable to normal" +version = __version__ = "4.33.0 Released 02-Jan-2021" __version__ = version.split()[0] # For PEP 396 and PEP 345 @@ -277,6 +277,23 @@ def _running_windows(): return sys.platform.startswith('win') +def _running_trinket(): + """ + A special case for Trinket. Checks both the OS and the number of environment variables + Currently, Trinket only has ONE environment variable. This fact is used to figure out if Trinket is being used. + + Returns True if "Trinket" (in theory) + + :return: True if sys.platform indicates Linux and the number of environment variables is 1 + :rtype: (bool) + """ + if len(os.environ) == 1 and sys.platform.startswith('linux'): + return True + + return False + + + # Handy python statements to increment and decrement with wrapping that I don't want to forget # count = (count + (MAX - 1)) % MAX # Decrement - roll over to MAX from 0 # count = (count + 1) % MAX # Increment to MAX then roll over to 0 @@ -759,7 +776,7 @@ class Element(): self.Key = key # dictionary key for return values self.Tooltip = tooltip self.TooltipObject = None - self.visible = visible + self._visible = visible self.TKRightClickMenu = None self.Widget = None # Set when creating window. Has the main tkinter widget for element self.Tearoff = False # needed because of right click menu code @@ -773,6 +790,18 @@ class Element(): if not hasattr(self, 'ItemFont'): self.ItemFont = None + + @property + def visible(self): + """ + Returns visibility state for the element. This is a READONLY property + To control visibility, use the element's update method + :return: Visibility state for element + :rtype: (bool) + """ + return self._visible + + def _RightClickMenuCallback(self, event): """ Callback function that's called when a right click happens. Shows right click menu as result @@ -783,6 +812,7 @@ class Element(): self.TKRightClickMenu.tk_popup(event.x_root, event.y_root, 0) self.TKRightClickMenu.grab_release() + def _MenuItemChosenCallback(self, item_chosen): # TEXT Menu item callback """ Callback function called when user chooses a menu item from menubar, Button Menu or right click menu @@ -799,6 +829,7 @@ class Element(): # Window._window_that_exited = self.ParentForm # self.ParentForm.TKroot.quit() # kick the users out of the mainloop + def _FindReturnKeyBoundButton(self, form): """ Searches for which Button has the flag Button.BindReturnKey set. It is called recursively when a @@ -835,6 +866,7 @@ class Element(): return rc return None + def _TextClickedHandler(self, event): """ Callback that's called when a text element is clicked on with events enabled on the Text Element. @@ -989,6 +1021,7 @@ class Element(): """ self._generic_callback_handler('') + def _user_bind_callback(self, bind_string, event): """ Used when user binds a tkinter event directly to an element @@ -1009,6 +1042,7 @@ class Element(): self._generic_callback_handler(force_key_to_be=key) + def bind(self, bind_string, key_modifier): """ Used to add tkinter events to an Element. @@ -1093,6 +1127,7 @@ class Element(): except: print('Warning, error setting height on element with key=', self.Key) + def get_size(self): """ Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method. @@ -1107,6 +1142,7 @@ class Element(): w = h = None return w, h + def hide_row(self): """ Hide the entire row an Element is located on. @@ -1117,6 +1153,7 @@ class Element(): except: print('Warning, error hiding element row for key =', self.Key) + def unhide_row(self): """ Unhides (makes visible again) the row container that the Element is located on. @@ -1166,6 +1203,7 @@ class Element(): print('Warning bad cursor specified ', cursor) print(e) + def set_vscroll_position(self, percent_from_top): """ Attempts to set the vertical scroll postition for an element's Widget @@ -1370,7 +1408,7 @@ class Input(Element): self.TKEntry.pack(padx=self.pad_used[0], pady=self.pad_used[1]) # self.TKEntry.pack(padx=self.pad_used[0], pady=self.pad_used[1], in_=self.ParentRowFrame) if visible is not None: - self.visible = visible + self._visible = visible def Get(self): @@ -1524,7 +1562,7 @@ class Combo(Element): elif visible is True: self.TKCombo.pack(padx=self.pad_used[0], pady=self.pad_used[1]) if visible is not None: - self.visible = visible + self._visible = visible def Get(self): """ @@ -1650,7 +1688,7 @@ class OptionMenu(Element): elif visible is True: self.TKOptionMenu.pack(padx=self.pad_used[0], pady=self.pad_used[1]) if visible is not None: - self.visible = visible + self._visible = visible set_focus = Element.SetFocus set_tooltip = Element.SetTooltip @@ -1803,7 +1841,7 @@ class Listbox(Element): except: print('Listbox.update error trying to change mode to: ', select_mode) if visible is not None: - self.visible = visible + self._visible = visible def SetValue(self, values): """ @@ -2008,7 +2046,7 @@ class Radio(Element): elif visible is True: self.TKRadio.pack(padx=self.pad_used[0], pady=self.pad_used[1]) if visible is not None: - self.visible = visible + self._visible = visible def ResetGroup(self): """ @@ -2183,7 +2221,7 @@ class Checkbox(Element): elif visible is True: self.TKCheckbutton.pack(padx=self.pad_used[0], pady=self.pad_used[1]) if visible is not None: - self.visible = visible + self._visible = visible get = Get set_focus = Element.SetFocus @@ -2314,7 +2352,7 @@ class Spin(Element): elif visible is True: self.TKSpinBox.pack(padx=self.pad_used[0], pady=self.pad_used[1]) if visible is not None: - self.visible = visible + self._visible = visible def _SpinChangedHandler(self, event): """ @@ -2561,7 +2599,7 @@ class Multiline(Element): except: pass if visible is not None: - self.visible = visible + self._visible = visible def Get(self): @@ -2771,7 +2809,7 @@ class Text(Element): elif visible is True: self.TKText.pack(padx=self.pad_used[0], pady=self.pad_used[1]) if visible is not None: - self.visible = visible + self._visible = visible def Get(self): """ @@ -2895,7 +2933,7 @@ class StatusBar(Element): elif visible is True: self.TKText.pack(padx=self.pad_used[0], pady=self.pad_used[1]) if visible is not None: - self.visible = visible + self._visible = visible set_focus = Element.SetFocus set_tooltip = Element.SetTooltip @@ -3185,7 +3223,7 @@ class Output(Element): elif visible is True: self._TKOut.frame.pack(padx=self.pad_used[0], pady=self.pad_used[1]) if visible is not None: - self.visible = visible + self._visible = visible def Get(self): """ @@ -3735,7 +3773,7 @@ class Button(Element): disabled_button_color[1] if disabled_button_color[1] is not None else self.DisabledButtonColor[1]) if visible is not None: - self.visible = visible + self._visible = visible def GetText(self): @@ -3895,7 +3933,7 @@ class ButtonMenu(Element): elif visible is True: self.TKButtonMenu.pack(padx=self.pad_used[0], pady=self.pad_used[1]) if visible is not None: - self.visible = visible + self._visible = visible def Click(self): """ @@ -4028,7 +4066,7 @@ class ProgressBar(Element): elif visible is True: self.TKProgressBar.TKProgressBarForReal.pack(padx=self.pad_used[0], pady=self.pad_used[1]) if visible is not None: - self.visible = visible + self._visible = visible self.TKProgressBar.Update(current_count, max=max) try: @@ -4153,7 +4191,7 @@ class Image(Element): if filename is None and image is None and visible is None and size == (None, None): self.tktext_label.image = None if visible is not None: - self.visible = visible + self._visible = visible def UpdateAnimation(self, source, time_between_frames=0): @@ -4811,7 +4849,7 @@ class Graph(Element): elif visible is True: self._TKCanvas2.pack(padx=self.pad_used[0], pady=self.pad_used[1]) if visible is not None: - self.visible = visible + self._visible = visible def Move(self, x_direction, y_direction): """ @@ -5225,7 +5263,7 @@ class Frame(Element): if value is not None: self.TKFrame.config(text=str(value)) if visible is not None: - self.visible = visible + self._visible = visible add_row = AddRow layout = Layout @@ -5463,7 +5501,7 @@ class Tab(Element): if visible is False: state = 'hidden' if visible is not None: - self.visible = visible + self._visible = visible self.ParentNotebook.tab(self.TabID, state=state) @@ -5833,7 +5871,7 @@ class Slider(Element): if range != (None, None): self.TKScale.config(from_=range[0], to_=range[1]) if visible is not None: - self.visible = visible + self._visible = visible def _SliderChangedHandler(self, event): """ @@ -6189,7 +6227,7 @@ class Column(Element): if self.ParentPanedWindow: self.ParentPanedWindow.add(self.TKColFrame) if visible is not None: - self.visible = visible + self._visible = visible def contents_changed(self): """ @@ -6287,7 +6325,7 @@ class Pane(Element): elif visible is True: self.PanedWindow.pack(padx=self.pad_used[0], pady=self.pad_used[1]) if visible is not None: - self.visible = visible + self._visible = visible set_focus = Element.SetFocus set_tooltip = Element.SetTooltip @@ -6638,7 +6676,7 @@ class Menu(Element): elif self.TKMenu is not None: self.ParentForm.TKroot.configure(menu=self.TKMenu) if visible is not None: - self.visible = visible + self._visible = visible set_focus = Element.SetFocus set_tooltip = Element.SetTooltip @@ -6854,7 +6892,7 @@ class Table(Element): else: self.TKTreeview.tag_configure(row_def[0], background=row_def[2], foreground=row_def[1]) if visible is not None: - self.visible = visible + self._visible = visible def _treeview_selected(self, event): """ @@ -7154,7 +7192,7 @@ class Tree(Element): elif visible is True: self.TKTreeview.pack(padx=self.pad_used[0], pady=self.pad_used[1]) if visible is not None: - self.visible = visible + self._visible = visible return self @@ -8780,7 +8818,7 @@ class Window: self.TKrootDestroyed = True self.XFound = True else: - self.LastButtonClicked = '-WINDOW CLOSE ATTEMPTED-' + self.LastButtonClicked = WINDOW_CLOSE_ATTEMPTED_EVENT elif Window._root_running_mainloop == Window.hidden_master_root: _exit_mainloop(self) else: @@ -8788,7 +8826,7 @@ class Window: self.TKroot.destroy() # destroy this window self.XFound = True else: - self.LastButtonClicked = '-WINDOW CLOSE ATTEMPTED-' + self.LastButtonClicked = WINDOW_CLOSE_ATTEMPTED_EVENT if self.close_destroys_window: self.RootNeedsDestroying = True @@ -8863,7 +8901,8 @@ class Window: def AlphaChannel(self): """ A property that changes the current alpha channel value (internal value) - :return: (float) the current alpha channel setting according to self, not read directly from tkinter + :return: the current alpha channel setting according to self, not read directly from tkinter + :rtype: (float) """ return self._AlphaChannel @@ -9277,7 +9316,8 @@ class Window: :param key: The key to find :type key: str | int | tuple | object"" - :rtype: Element |""" + :rtype: Element | None + """ return self.FindElement(key) @@ -11291,14 +11331,6 @@ def _BuildResultsForSubform(form, initialize_only, top_level_form): AddToReturnList(form, value) form.ReturnValuesDictionary[event] = value - # This is SO dodgy.... if the Titlebar element's X was clicked, act like the real window was closed - # if not initialize_only and event == TITLEBAR_CLOSE_KEY and form == top_level_form: - # form._OnClosingCallback() - # if form.close_destroys_window: - # event = WINDOW_CLOSED - # else: - # event = WINDOW_CLOSE_ATTEMPTED_EVENT - if not form.UseDictionary: form.ReturnValues = event, form.ReturnValuesList else: @@ -13253,19 +13285,6 @@ def _convert_window_to_tk(window): master = window.TKroot master.title(window.Title) InitializeResults(window) - # try: - # if window.NoTitleBar: - # if sys.platform == 'linux': - # window.TKroot.wm_attributes("-type", "splash") - # else: - # window.TKroot.wm_overrideredirect(True) - # # Special case for Mac. Need to clear flag again if not tkinter version 8.6.10+ - # if sys.platform.startswith('darwin') and ENABLE_MAC_NOTITLEBAR_PATCH and (sum([int(i) for i in tclversion_detailed.split('.')]) < 24): - # print('* Applying Mac no_titlebar patch *') - # window.TKroot.wm_overrideredirect(False) - # except: - # print('** Problem setting no titlebar **') - # pass PackFormIntoFrame(window, master, window) @@ -17915,14 +17934,14 @@ def _copy_files_from_github(files, github_url=None): """ - class ReturnInfo: + class _ReturnInfo: src = "" package = "" new_files = "" path = "" version = "" - info = ReturnInfo() + info = _ReturnInfo() info.src = files[0] info.package = path_stem(files[0]) @@ -17959,7 +17978,7 @@ def _copy_files_from_github(files, github_url=None): page_contents["__init__.py"] = ("from ." + info.package + " import *\n").encode() if version != "unknown": page_contents["__init__.py"] += ("from ." + info.package + " import __version__\n").encode() - if sys.platform.startswith("linux") or (sys.platform == "ios"): + if _running_linux() or _running_mac(): dir_search = sys.path else: dir_search = site.getsitepackages() @@ -17971,7 +17990,7 @@ def _copy_files_from_github(files, github_url=None): else: raise ModuleNotFoundError("Unable to find site-packages folder!") - path = str(sitepackages_path) + "\\" + str(info.package) + path = os.path.join(str(sitepackages_path), str(info.package)) info.path = str(path) if (os.path.isfile(path)): @@ -17981,10 +18000,10 @@ def _copy_files_from_github(files, github_url=None): os.mkdir(path) for file, contents in page_contents.items(): - with open(str(path) + "/" + str(file), "wb") as f: + with open(os.path.join(str(path), str(file)), "wb") as f: f.write(contents) - if (sys.platform == "ios"): + if _running_mac(): pypi_packages = str(sitepackages_path) + "/.pypi_packages" config = configparser.ConfigParser() config.read(pypi_packages) @@ -18433,7 +18452,7 @@ test = main theme(CURRENT_LOOK_AND_FEEL) # See if running on Trinket. If Trinket, then use custom titlebars since Trinket doesn't supply any -if len(os.environ) == 1: +if _running_trinket(): USE_CUSTOM_TITLEBAR = True if tclversion_detailed.startswith('8.5'): diff --git a/docs/call reference.md b/docs/call reference.md index ffe85202..8faf26dc 100644 --- a/docs/call reference.md +++ b/docs/call reference.md @@ -21,70 +21,70 @@ Here are all of the Elements, the Window & SystemTray classes, and all functions Button Element - Defines all possible buttons. The shortcuts such as Submit, FileBrowse, ... each create a Button ``` -Button(button_text="", - button_type=7, - target=(None, None), - tooltip=None, - file_types=(('ALL Files', '*.*'),), - initial_folder=None, - default_extension="", - disabled=False, - change_submits=False, - enable_events=False, - image_filename=None, - image_data=None, - image_size=(None, None), - image_subsample=None, - border_width=None, - size=(None, None), - auto_size_button=None, - button_color=None, - disabled_button_color=None, - highlight_colors=None, - use_ttk_buttons=None, - font=None, - bind_return_key=False, - focus=False, - pad=None, - key=None, - k=None, - visible=True, - metadata=None) +Button(button_text = "", + button_type = 7, + target = (None, None), + tooltip = None, + file_types = (('ALL Files', '*.*'),), + initial_folder = None, + default_extension = "", + disabled = False, + change_submits = False, + enable_events = False, + image_filename = None, + image_data = None, + image_size = (None, None), + image_subsample = None, + border_width = None, + size = (None, None), + auto_size_button = None, + button_color = None, + disabled_button_color = None, + highlight_colors = None, + use_ttk_buttons = None, + font = None, + bind_return_key = False, + focus = False, + pad = None, + key = None, + k = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | Text to be displayed on the button | -| int | button_type | You should NOT be setting this directly. ONLY the shortcut functions set this | -| Union[str, Tuple[int, int]] | target | key or (row,col) target for the button. Note that -1 for column means 1 element to the left of this one. The constant ThisRow is used to indicate the current row. The Button itself is a valid target for some types of button | -| str | tooltip | text, that will appear when mouse hovers over the element | -| Tuple[Tuple[str, str], ...] | file_types | the filetypes that will be used to match files. To indicate all files: (("ALL Files", "*.*"),). Note - NOT SUPPORTED ON MAC | -| str | initial_folder | starting path for folders and files | -| str | default_extension | If no extension entered by user, add this to filename (only used in saveas dialogs) | -| bool | disabled | If True button will be created disabled | -| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | -| bool | enable_events | Turns on the element specific events. If this button is a target, should it generate an event when filled in | -| str | image_filename | image filename if there is a button image. GIFs and PNGs only. | -| Union[bytes, str] | image_data | Raw or Base64 representation of the image to put on button. Choose either filename or data | -| (int, int) | image_size | Size of the image in pixels (width, height) | -| int | image_subsample | amount to reduce the size of the image. Divides the size by this number. 2=1/2, 3=1/3, 4=1/4, etc | -| int | border_width | width of border around button in pixels | -| (int, int) | size | (width, height) of the button in characters wide, rows high | -| bool | auto_size_button | if True the button size is sized to fit the text | -| Tuple[str, str] or str or None | button_color | of button. Easy to remember which is which if you say "ON" between colors. "red" on "green". | -| Tuple[str, str] | disabled_button_color | colors to use when button is disabled (text, background). Use None for a color if don't want to change. Only ttk buttons support both text and background colors. tk buttons only support changing text color | -| Tuple[str, str] | highlight_colors | colors to use when button has focus (highlight, background). None will use computed colors. Only used by Linux and only for non-TTK button | -| bool | use_ttk_buttons | True = use ttk buttons. False = do not use ttk buttons. None (Default) = use ttk buttons only if on a Mac and not with button images | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | bind_return_key | If True the return key will cause this button to be pressed | -| bool | focus | if True, initial focus will be put on this button | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| str | button_text | Text to be displayed on the button | +| int | button_type | You should NOT be setting this directly. ONLY the shortcut functions set this | +| str or Tuple[int, int] | target | key or (row,col) target for the button. Note that -1 for column means 1 element to the left of this one. The constant ThisRow is used to indicate the current row. The Button itself is a valid target for some types of button | +| str | tooltip | text, that will appear when mouse hovers over the element | +| Tuple[Tuple[str, str], ...] | file_types | the filetypes that will be used to match files. To indicate all files: (("ALL Files", "*.*"),). Note - NOT SUPPORTED ON MAC | +| str | initial_folder | starting path for folders and files | +| str | default_extension | If no extension entered by user, add this to filename (only used in saveas dialogs) | +| bool | disabled | If True button will be created disabled | +| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | +| bool | enable_events | Turns on the element specific events. If this button is a target, should it generate an event when filled in | +| str | image_filename | image filename if there is a button image. GIFs and PNGs only. | +| bytes or str | image_data | Raw or Base64 representation of the image to put on button. Choose either filename or data | +| (int, int) | image_size | Size of the image in pixels (width, height) | +| int | image_subsample | amount to reduce the size of the image. Divides the size by this number. 2=1/2, 3=1/3, 4=1/4, etc | +| int | border_width | width of border around button in pixels | +| (int, int) | size | (width, height) of the button in characters wide, rows high | +| bool | auto_size_button | if True the button size is sized to fit the text | +| Tuple[str, str] or str or None | button_color | Color of button. Easy to remember which is which if you say "ON" between colors. "red" on "green". Normally a tuple, but can be a simplified-button-color-string "foreground on background" | +| Tuple[str, str] | disabled_button_color | colors to use when button is disabled (text, background). Use None for a color if don't want to change. Only ttk buttons support both text and background colors. tk buttons only support changing text color | +| Tuple[str, str] | highlight_colors | colors to use when button has focus (highlight, background). None will use computed colors. Only used by Linux and only for non-TTK button | +| bool | use_ttk_buttons | True = use ttk buttons. False = do not use ttk buttons. None (Default) = use ttk buttons only if on a Mac and not with button images | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | bind_return_key | If True the return key will cause this button to be pressed | +| bool | focus | if True, initial focus will be put on this button | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### Click @@ -110,7 +110,7 @@ Returns the current text shown on a button Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -138,15 +138,15 @@ Parameter Descriptions: Changes some of the settings for the Button Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(text=None, - button_color=(None, None), - disabled=None, - image_data=None, - image_filename=None, - visible=None, - image_subsample=None, - disabled_button_color=(None, None), - image_size=None) +Update(text = None, + button_color = (None, None), + disabled = None, + image_data = None, + image_filename = None, + visible = None, + image_subsample = None, + disabled_button_color = (None, None), + image_size = None) ``` Parameter Descriptions: @@ -156,7 +156,7 @@ Parameter Descriptions: | str | text | sets button text | | Tuple[str, str] or (str) | button_color | of button. Easy to remember which is which if you say "ON" between colors. "red" on "green" | | bool | disabled | disable or enable state of the element | -| Union[bytes, str] | image_data | Raw or Base64 representation of the image to put on button. Choose either filename or data | +| bytes or str | image_data | Raw or Base64 representation of the image to put on button. Choose either filename or data | | str | image_filename | image filename if there is a button image. GIFs and PNGs only. | | Tuple[str, str] | disabled_button_color | colors to use when button is disabled (text, background). Use None for a color if don't want to change. Only ttk buttons support both text and background colors. tk buttons only support changing text color | | bool | visible | control visibility of element | @@ -193,9 +193,9 @@ click() Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -254,7 +254,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -269,7 +269,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -334,15 +334,15 @@ unhide_row() Changes some of the settings for the Button Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(text=None, - button_color=(None, None), - disabled=None, - image_data=None, - image_filename=None, - visible=None, - image_subsample=None, - disabled_button_color=(None, None), - image_size=None) +update(text = None, + button_color = (None, None), + disabled = None, + image_data = None, + image_filename = None, + visible = None, + image_subsample = None, + disabled_button_color = (None, None), + image_size = None) ``` Parameter Descriptions: @@ -352,13 +352,24 @@ Parameter Descriptions: | str | text | sets button text | | Tuple[str, str] or (str) | button_color | of button. Easy to remember which is which if you say "ON" between colors. "red" on "green" | | bool | disabled | disable or enable state of the element | -| Union[bytes, str] | image_data | Raw or Base64 representation of the image to put on button. Choose either filename or data | +| bytes or str | image_data | Raw or Base64 representation of the image to put on button. Choose either filename or data | | str | image_filename | image filename if there is a button image. GIFs and PNGs only. | | Tuple[str, str] | disabled_button_color | colors to use when button is disabled (text, background). Use None for a color if don't want to change. Only ttk buttons support both text and background colors. tk buttons only support changing text color | | bool | visible | control visibility of element | | int | image_subsample | amount to reduce the size of the image. Divides the size by this number. 2=1/2, 3=1/3, 4=1/4, etc | | (int, int) | image_size | Size of the image in pixels (width, height) | +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + ## ButtonMenu Element The Button Menu Element. Creates a button that when clicked will show a menu similar to right click menu @@ -366,56 +377,56 @@ Parameter Descriptions: ``` ButtonMenu(button_text, menu_def, - tooltip=None, - disabled=False, - image_filename=None, - image_data=None, - image_size=(None, None), - image_subsample=None, - border_width=None, - size=(None, None), - auto_size_button=None, - button_color=None, - text_color=None, - background_color=None, - disabled_text_color=None, - font=None, - item_font=None, - pad=None, - key=None, - k=None, - tearoff=False, - visible=True, - metadata=None) + tooltip = None, + disabled = False, + image_filename = None, + image_data = None, + image_size = (None, None), + image_subsample = None, + border_width = None, + size = (None, None), + auto_size_button = None, + button_color = None, + text_color = None, + background_color = None, + disabled_text_color = None, + font = None, + item_font = None, + pad = None, + key = None, + k = None, + tearoff = False, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | Text to be displayed on the button | -| List[List[str]] | menu_def | A list of lists of Menu items to show when this element is clicked. See docs for format as they are the same for all menu types | -| str | tooltip | text, that will appear when mouse hovers over the element | -| bool | disabled | If True button will be created disabled | -| str | image_filename | image filename if there is a button image. GIFs and PNGs only. | -| Union[bytes, str] | image_data | Raw or Base64 representation of the image to put on button. Choose either filename or data | -| (int, int) | image_size | Size of the image in pixels (width, height) | -| int | image_subsample | amount to reduce the size of the image. Divides the size by this number. 2=1/2, 3=1/3, 4=1/4, etc | -| int | border_width | width of border around button in pixels | -| (int, int) | size | (width, height) of the button in characters wide, rows high | -| bool | auto_size_button | if True the button size is sized to fit the text | -| Tuple[str, str] or str | button_color | of button. Easy to remember which is which if you say "ON" between colors. "red" on "green" | -| str | background_color | color of the background | -| str | text_color | element's text color. Can be in #RRGGBB format or a color name "black" | -| str | disabled_text_color | color to use for text when item is disabled. Can be in #RRGGBB format or a color name "black" | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| Union[str, Tuple[str, int]] | item_font | specifies the font family, size, etc, for the menu items | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| bool | tearoff | Determines if menus should allow them to be torn off | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| str | button_text | Text to be displayed on the button | +| List[List[str]] | menu_def | A list of lists of Menu items to show when this element is clicked. See docs for format as they are the same for all menu types | +| str | tooltip | text, that will appear when mouse hovers over the element | +| bool | disabled | If True button will be created disabled | +| str | image_filename | image filename if there is a button image. GIFs and PNGs only. | +| bytes or str | image_data | Raw or Base64 representation of the image to put on button. Choose either filename or data | +| (int, int) | image_size | Size of the image in pixels (width, height) | +| int | image_subsample | amount to reduce the size of the image. Divides the size by this number. 2=1/2, 3=1/3, 4=1/4, etc | +| int | border_width | width of border around button in pixels | +| (int, int) | size | (width, height) of the button in characters wide, rows high | +| bool | auto_size_button | if True the button size is sized to fit the text | +| Tuple[str, str] or str | button_color | of button. Easy to remember which is which if you say "ON" between colors. "red" on "green" | +| str | background_color | color of the background | +| str | text_color | element's text color. Can be in #RRGGBB format or a color name "black" | +| str | disabled_text_color | color to use for text when item is disabled. Can be in #RRGGBB format or a color name "black" | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str or Tuple[str, int] | item_font | specifies the font family, size, etc, for the menu items | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| bool | tearoff | Determines if menus should allow them to be torn off | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### Click @@ -431,7 +442,7 @@ Click() Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -459,7 +470,7 @@ Parameter Descriptions: Changes some of the settings for the ButtonMenu Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(menu_definition, visible=None) +Update(menu_definition, visible = None) ``` Parameter Descriptions: @@ -490,9 +501,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -511,7 +522,7 @@ Return the size of an element in Pixels. Care must be taken as some elements us |Type|Name|Meaning| |---|---|---| -|| **return** | width and height of the element | +| bool | **return** | width and height of the element | ### hide_row @@ -541,7 +552,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -556,7 +567,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -621,7 +632,7 @@ unhide_row() Changes some of the settings for the ButtonMenu Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(menu_definition, visible=None) +update(menu_definition, visible = None) ``` Parameter Descriptions: @@ -631,44 +642,55 @@ Parameter Descriptions: | List[List] | menu_definition | (New menu definition (in menu definition format) | | bool | visible | control visibility of element | +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + ## Canvas Element ``` -Canvas(canvas=None, - background_color=None, - size=(None, None), - pad=None, - key=None, - k=None, - tooltip=None, - right_click_menu=None, - visible=True, - border_width=0, - metadata=None) +Canvas(canvas = None, + background_color = None, + size = (None, None), + pad = None, + key = None, + k = None, + tooltip = None, + right_click_menu = None, + visible = True, + border_width = 0, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| (tk.Canvas) | canvas | Your own tk.Canvas if you already created it. Leave blank to create a Canvas | -| str | background_color | color of background | -| Tuple[int,int] | size | (width in char, height in rows) size in pixels to make canvas | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| str | tooltip | text, that will appear when mouse hovers over the element | -| List[List[Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| bool | visible | set visibility state of the element | -| int | border_width | width of border around element in pixels. Not normally used with Canvas element | -| Any | metadata | User metadata that can be set to ANYTHING | +| (tk.Canvas) | canvas | Your own tk.Canvas if you already created it. Leave blank to create a Canvas | +| str | background_color | color of background | +| Tuple[int,int] | size | (width in char, height in rows) size in pixels to make canvas | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | tooltip | text, that will appear when mouse hovers over the element | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| bool | visible | set visibility state of the element | +| int | border_width | width of border around element in pixels. Not normally used with Canvas element | +| Any | metadata | User metadata that can be set to ANYTHING | ### SetFocus Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -699,7 +721,7 @@ Returns the underlying tkiner Canvas widget |Type|Name|Meaning| |---|---|---| -|| **return** | The tkinter canvas widget | +| bool | **return** | The tkinter canvas widget | ### bind @@ -722,9 +744,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -773,7 +795,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -788,7 +810,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -844,49 +866,60 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +|| **return** | Visibility state for element | + ## Checkbox Element Checkbox Element - Displays a checkbox and text next to it ``` Checkbox(text, - default=False, - size=(None, None), - auto_size_text=None, - font=None, - background_color=None, - text_color=None, - change_submits=False, - enable_events=False, - disabled=False, - key=None, - k=None, - pad=None, - tooltip=None, - visible=True, - metadata=None) + default = False, + size = (None, None), + auto_size_text = None, + font = None, + background_color = None, + text_color = None, + change_submits = False, + enable_events = False, + disabled = False, + key = None, + k = None, + pad = None, + tooltip = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | text | Text to display next to checkbox | -| bool | default | Set to True if you want this checkbox initially checked | -| (int, int) | size | (width, height) width = characters-wide, height = rows-high | -| bool | auto_size_text | if True will size the element to match the length of the text | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | -| bool | enable_events | Turns on the element specific events. Checkbox events happen when an item changes | -| bool | disabled | set disable state | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| str | tooltip | text, that will appear when mouse hovers over the element | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| str | text | Text to display next to checkbox | +| bool | default | Set to True if you want this checkbox initially checked | +| (int, int) | size | (width, height) width = characters-wide, height = rows-high | +| bool | auto_size_text | if True will size the element to match the length of the text | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | +| bool | enable_events | Turns on the element specific events. Checkbox events happen when an item changes | +| bool | disabled | set disable state | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str | tooltip | text, that will appear when mouse hovers over the element | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### Get @@ -903,7 +936,7 @@ Return the current state of this checkbox Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -932,12 +965,12 @@ Changes some of the settings for the Checkbox Element. Must call `Window.Read` o Note that changing visibility may cause element to change locations when made visible after invisible ``` -Update(value=None, - text=None, - background_color=None, - text_color=None, - disabled=None, - visible=None) +Update(value = None, + text = None, + background_color = None, + text_color = None, + disabled = None, + visible = None) ``` Parameter Descriptions: @@ -972,9 +1005,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -1033,7 +1066,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -1048,7 +1081,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -1100,12 +1133,12 @@ Changes some of the settings for the Checkbox Element. Must call `Window.Read` o Note that changing visibility may cause element to change locations when made visible after invisible ``` -update(value=None, - text=None, - background_color=None, - text_color=None, - disabled=None, - visible=None) +update(value = None, + text = None, + background_color = None, + text_color = None, + disabled = None, + visible = None) ``` Parameter Descriptions: @@ -1119,51 +1152,62 @@ Parameter Descriptions: | bool | disabled | disable or enable element | | bool | visible | control visibility of element | +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +|| **return** | Visibility state for element | + ## Column Element A container element that is used to create a layout within your window's layout ``` Column(layout, - background_color=None, - size=(None, None), - pad=None, - scrollable=False, - vertical_scroll_only=False, - right_click_menu=None, - key=None, - k=None, - visible=True, - justification=None, - element_justification=None, - vertical_alignment=None, - grab=None, - expand_x=None, - expand_y=None, - metadata=None) + background_color = None, + size = (None, None), + pad = None, + scrollable = False, + vertical_scroll_only = False, + right_click_menu = None, + key = None, + k = None, + visible = True, + justification = None, + element_justification = None, + vertical_alignment = None, + grab = None, + expand_x = None, + expand_y = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| List[List[Element]] | layout | Layout that will be shown in the Column container | -| str | background_color | color of background of entire Column | -| (int, int) | size | (width, height) size in pixels (doesn't work quite right, sometimes only 1 dimension is set by tkinter | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| bool | scrollable | if True then scrollbars will be added to the column | -| bool | vertical_scroll_only | if Truen then no horizontal scrollbar will be shown | -| List[List[Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| Union[str, int, tuple, object] | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| bool | visible | set visibility state of the element | -| str | justification | set justification for the Column itself. Note entire row containing the Column will be affected | -| str | element_justification | All elements inside the Column will have this justification 'left', 'right', 'center' are valid values | -| str | vertical_alignment | Place the column at the 'top', 'center', 'bottom' of the row (can also use t,c,r). Defaults to no setting (tkinter decides) | -| bool | grab | If True can grab this element and move the window around. Default is False | -| bool | expand_x | If True the column will automatically expand in the X direction to fill available space | -| bool | expand_y | If True the column will automatically expand in the Y direction to fill available space | -| Any | metadata | User metadata that can be set to ANYTHING | +| List[List[Element]] | layout | Layout that will be shown in the Column container | +| str | background_color | color of background of entire Column | +| (int, int) | size | (width, height) size in pixels (doesn't work quite right, sometimes only 1 dimension is set by tkinter | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| bool | scrollable | if True then scrollbars will be added to the column | +| bool | vertical_scroll_only | if Truen then no horizontal scrollbar will be shown | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| str or int or tuple or object | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| bool | visible | set visibility state of the element | +| str | justification | set justification for the Column itself. Note entire row containing the Column will be affected | +| str | element_justification | All elements inside the Column will have this justification 'left', 'right', 'center' are valid values | +| str | vertical_alignment | Place the column at the 'top', 'center', 'bottom' of the row (can also use t,c,r). Defaults to no setting (tkinter decides) | +| bool | grab | If True can grab this element and move the window around. Default is False | +| bool | expand_x | If True the column will automatically expand in the X direction to fill available space | +| bool | expand_y | If True the column will automatically expand in the Y direction to fill available space | +| Any | metadata | User metadata that can be set to ANYTHING | ### AddRow @@ -1199,7 +1243,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -1227,7 +1271,7 @@ Parameter Descriptions: Changes some of the settings for the Column Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(visible=None) +Update(visible = None) ``` Parameter Descriptions: @@ -1271,9 +1315,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -1337,7 +1381,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -1352,7 +1396,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -1417,7 +1461,7 @@ unhide_row() Changes some of the settings for the Column Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(visible=None) +update(visible = None) ``` Parameter Descriptions: @@ -1426,51 +1470,62 @@ Parameter Descriptions: |--|--|--| | bool | visible | control visibility of element | +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +|| **return** | Visibility state for element | + ## Combo Element ComboBox Element - A combination of a single-line input and a drop-down menu. User can type in their own value or choose from list. ``` Combo(values, - default_value=None, - size=(None, None), - auto_size_text=None, - background_color=None, - text_color=None, - change_submits=False, - enable_events=False, - disabled=False, - key=None, - k=None, - pad=None, - tooltip=None, - readonly=False, - font=None, - visible=True, - metadata=None) + default_value = None, + size = (None, None), + auto_size_text = None, + background_color = None, + text_color = None, + change_submits = False, + enable_events = False, + disabled = False, + key = None, + k = None, + pad = None, + tooltip = None, + readonly = False, + font = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| List[Any] or Tuple[Any] | values | values to choose. While displayed as text, the items returned are what the caller supplied, not text | -| Any | default_value | Choice to be displayed as initial value. Must match one of values variable contents | -| (int, int) (width, height) | size | width = characters-wide, height = rows-high | -| bool | auto_size_text | True if element should be the same size as the contents | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | change_submits | DEPRICATED DO NOT USE. Use `enable_events` instead | -| bool | enable_events | Turns on the element specific events. Combo event is when a choice is made | -| bool | disabled | set disable state for element | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| str | tooltip | text that will appear when mouse hovers over this element | -| bool | readonly | make element readonly (user can't change). True means user cannot change | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| List[Any] or Tuple[Any] | values | values to choose. While displayed as text, the items returned are what the caller supplied, not text | +| Any | default_value | Choice to be displayed as initial value. Must match one of values variable contents | +| (int, int) (width, height) | size | width = characters-wide, height = rows-high | +| bool | auto_size_text | True if element should be the same size as the contents | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | change_submits | DEPRICATED DO NOT USE. Use `enable_events` instead | +| bool | enable_events | Turns on the element specific events. Combo event is when a choice is made | +| bool | disabled | set disable state for element | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str | tooltip | text that will appear when mouse hovers over this element | +| bool | readonly | make element readonly (user can't change). True means user cannot change | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### Get @@ -1488,7 +1543,7 @@ You should be using values from your call to window.Read instead. Know what you Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -1519,26 +1574,26 @@ though more combinations are available. The easy way to remember is that if you change the readonly parameter then you are enabling the element. ``` -Update(value=None, - values=None, - set_to_index=None, - disabled=None, - readonly=None, - font=None, - visible=None) +Update(value = None, + values = None, + set_to_index = None, + disabled = None, + readonly = None, + font = None, + visible = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | value | change which value is current selected based on new list of previous list of choices | -| List[Any] | values | change list of choices | -| int | set_to_index | change selection to a particular choice starting with index = 0 | -| bool | disabled | disable or enable state of the element | -| bool | readonly | if True make element readonly (user cannot change any choices). Enables the element if either choice are made. | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | visible | control visibility of element | +| Any | value | change which value is current selected based on new list of previous list of choices | +| List[Any] | values | change list of choices | +| int | set_to_index | change selection to a particular choice starting with index = 0 | +| bool | disabled | disable or enable state of the element | +| bool | readonly | if True make element readonly (user cannot change any choices). Enables the element if either choice are made. | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | visible | control visibility of element | ### bind @@ -1561,9 +1616,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -1623,7 +1678,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -1638,7 +1693,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -1692,26 +1747,37 @@ though more combinations are available. The easy way to remember is that if you change the readonly parameter then you are enabling the element. ``` -update(value=None, - values=None, - set_to_index=None, - disabled=None, - readonly=None, - font=None, - visible=None) +update(value = None, + values = None, + set_to_index = None, + disabled = None, + readonly = None, + font = None, + visible = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | value | change which value is current selected based on new list of previous list of choices | -| List[Any] | values | change list of choices | -| int | set_to_index | change selection to a particular choice starting with index = 0 | -| bool | disabled | disable or enable state of the element | -| bool | readonly | if True make element readonly (user cannot change any choices). Enables the element if either choice are made. | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | visible | control visibility of element | +| Any | value | change which value is current selected based on new list of previous list of choices | +| List[Any] | values | change list of choices | +| int | set_to_index | change selection to a particular choice starting with index = 0 | +| bool | disabled | disable or enable state of the element | +| bool | readonly | if True make element readonly (user cannot change any choices). Enables the element if either choice are made. | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | visible | control visibility of element | + +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +|| **return** | Visibility state for element | ## Frame Element @@ -1720,46 +1786,46 @@ Parameter Descriptions: ``` Frame(title, layout, - title_color=None, - background_color=None, - title_location=None, - relief="groove", - size=(None, None), - font=None, - pad=None, - border_width=None, - key=None, - k=None, - tooltip=None, - right_click_menu=None, - visible=True, - element_justification="left", - vertical_alignment=None, - metadata=None) + title_color = None, + background_color = None, + title_location = None, + relief = "groove", + size = (None, None), + font = None, + pad = None, + border_width = None, + key = None, + k = None, + tooltip = None, + right_click_menu = None, + visible = True, + element_justification = "left", + vertical_alignment = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | title | text that is displayed as the Frame's "label" or title | -| List[List[Elements]] | layout | The layout to put inside the Frame | -| str | title_color | color of the title text | -| str | background_color | background color of the Frame | -| enum | title_location | location to place the text title. Choices include: TITLE_LOCATION_TOP TITLE_LOCATION_BOTTOM TITLE_LOCATION_LEFT TITLE_LOCATION_RIGHT TITLE_LOCATION_TOP_LEFT TITLE_LOCATION_TOP_RIGHT TITLE_LOCATION_BOTTOM_LEFT TITLE_LOCATION_BOTTOM_RIGHT | -| enum | relief | relief style. Values are same as other elements with reliefs. Choices include RELIEF_RAISED RELIEF_SUNKEN RELIEF_FLAT RELIEF_RIDGE RELIEF_GROOVE RELIEF_SOLID | -| (int, int) | size | (width, height) (note this parameter may not always work) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| int | border_width | width of border around element in pixels | -| Union[str, int, tuple, object] | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| str | tooltip | text, that will appear when mouse hovers over the element | -| List[List[Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| bool | visible | set visibility state of the element | -| str | element_justification | All elements inside the Frame will have this justification 'left', 'right', 'center' are valid values | -| str | vertical_alignment | Place the column at the 'top', 'center', 'bottom' of the row (can also use t,c,r). Defaults to no setting (tkinter decides) | -| Any | metadata | User metadata that can be set to ANYTHING | +| str | title | text that is displayed as the Frame's "label" or title | +| List[List[Elements]] | layout | The layout to put inside the Frame | +| str | title_color | color of the title text | +| str | background_color | background color of the Frame | +| enum | title_location | location to place the text title. Choices include: TITLE_LOCATION_TOP TITLE_LOCATION_BOTTOM TITLE_LOCATION_LEFT TITLE_LOCATION_RIGHT TITLE_LOCATION_TOP_LEFT TITLE_LOCATION_TOP_RIGHT TITLE_LOCATION_BOTTOM_LEFT TITLE_LOCATION_BOTTOM_RIGHT | +| enum | relief | relief style. Values are same as other elements with reliefs. Choices include RELIEF_RAISED RELIEF_SUNKEN RELIEF_FLAT RELIEF_RIDGE RELIEF_GROOVE RELIEF_SOLID | +| (int, int) | size | (width, height) (note this parameter may not always work) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| int | border_width | width of border around element in pixels | +| str or int or tuple or object | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | tooltip | text, that will appear when mouse hovers over the element | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| bool | visible | set visibility state of the element | +| str | element_justification | All elements inside the Frame will have this justification 'left', 'right', 'center' are valid values | +| str | vertical_alignment | Place the column at the 'top', 'center', 'bottom' of the row (can also use t,c,r). Defaults to no setting (tkinter decides) | +| Any | metadata | User metadata that can be set to ANYTHING | ### AddRow @@ -1795,7 +1861,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -1823,7 +1889,7 @@ Parameter Descriptions: Changes some of the settings for the Frame Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(value=None, visible=None) +Update(value = None, visible = None) ``` Parameter Descriptions: @@ -1868,9 +1934,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -1934,7 +2000,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -1949,7 +2015,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -2000,7 +2066,7 @@ unhide_row() Changes some of the settings for the Frame Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(value=None, visible=None) +update(value = None, visible = None) ``` Parameter Descriptions: @@ -2010,6 +2076,17 @@ Parameter Descriptions: | Any | value | New text value to show on frame | | bool | visible | control visibility of element | +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +|| **return** | Visibility state for element | + ## Graph Element Creates an area for you to draw on. The MAGICAL property this Element has is that you interact @@ -2026,41 +2103,41 @@ Parameter Descriptions: Graph(canvas_size, graph_bottom_left, graph_top_right, - background_color=None, - pad=None, - change_submits=False, - drag_submits=False, - enable_events=False, - key=None, - k=None, - tooltip=None, - right_click_menu=None, - visible=True, - float_values=False, - border_width=0, - metadata=None) + background_color = None, + pad = None, + change_submits = False, + drag_submits = False, + enable_events = False, + key = None, + k = None, + tooltip = None, + right_click_menu = None, + visible = True, + float_values = False, + border_width = 0, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Tuple[int, int] | canvas_size | size of the canvas area in pixels | -| Tuple[int, int] | graph_bottom_left | (x,y) The bottoms left corner of your coordinate system | -| Tuple[int, int] | graph_top_right | (x,y) The top right corner of your coordinate system | -| str | background_color | background color of the drawing area | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| bool | change_submits | * DEPRICATED DO NOT USE. Use `enable_events` instead | -| bool | drag_submits | if True and Events are enabled for the Graph, will report Events any time the mouse moves while button down | -| bool | enable_events | If True then clicks on the Graph are immediately reported as an event. Use this instead of change_submits | -| Union[str, int, tuple, object] | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| str | tooltip | text, that will appear when mouse hovers over the element | -| List[List[Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| bool | visible | set visibility state of the element (Default = True) | -| bool | float_values | If True x,y coordinates are returned as floats, not ints | -| int | border_width | width of border around element in pixels. Not normally used for Graph Elements | -| Any | metadata | User metadata that can be set to ANYTHING | +| Tuple[int, int] | canvas_size | size of the canvas area in pixels | +| Tuple[int, int] | graph_bottom_left | (x,y) The bottoms left corner of your coordinate system | +| Tuple[int, int] | graph_top_right | (x,y) The top right corner of your coordinate system | +| str | background_color | background color of the drawing area | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| bool | change_submits | * DEPRICATED DO NOT USE. Use `enable_events` instead | +| bool | drag_submits | if True and Events are enabled for the Graph, will report Events any time the mouse moves while button down | +| bool | enable_events | If True then clicks on the Graph are immediately reported as an event. Use this instead of change_submits | +| str or int or tuple or object | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | tooltip | text, that will appear when mouse hovers over the element | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| bool | visible | set visibility state of the element (Default = True) | +| bool | float_values | If True x,y coordinates are returned as floats, not ints | +| int | border_width | width of border around element in pixels. Not normally used for Graph Elements | +| Any | metadata | User metadata that can be set to ANYTHING | ### BringFigureToFront @@ -2099,22 +2176,24 @@ DrawArc(top_left, bottom_right, extent, start_angle, - style=None, - arc_color="black", - line_width=1) + style = None, + arc_color = "black", + line_width = 1, + fill_color = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[Tuple[int, int], Tuple[float, float]] | top_left | the top left point of bounding rectangle | -| Union[Tuple[int, int], Tuple[float, float]] | bottom_right | the bottom right point of bounding rectangle | -| float | extent | Andle to end drawing. Used in conjunction with start_angle | -| float | start_angle | Angle to begin drawing. Used in conjunction with extent | -| str | style | Valid choices are One of these Style strings- 'pieslice', 'chord', 'arc', 'first', 'last', 'butt', 'projecting', 'round', 'bevel', 'miter' | -| str | arc_color | color to draw arc with | -| Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the arc +| Tuple[int, int] or Tuple[float, float] | top_left | the top left point of bounding rectangle | +| Tuple[int, int] or Tuple[float, float] | bottom_right | the bottom right point of bounding rectangle | +| float | extent | Andle to end drawing. Used in conjunction with start_angle | +| float | start_angle | Angle to begin drawing. Used in conjunction with extent | +| str | style | Valid choices are One of these Style strings- 'pieslice', 'chord', 'arc', 'first', 'last', 'butt', 'projecting', 'round', 'bevel', 'miter' | +| str | arc_color | color to draw arc with | +| str | fill_color | color to fill the area | +| int or None | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the arc ### DrawCircle @@ -2123,40 +2202,40 @@ Draws a circle, cenetered at the location provided. Can set the fill and outlin ``` DrawCircle(center_location, radius, - fill_color=None, - line_color="black", - line_width=1) + fill_color = None, + line_color = "black", + line_width = 1) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union [Tuple[int, int], Tuple[float, float]] | center_location | Center location using USER'S coordinate system | -| Union[int, float] | radius | Radius in user's coordinate values. | -| str | fill_color | color of the point to draw | -| str | line_color | color of the outer line that goes around the circle (sorry, can't set thickness) | -| int | line_width | width of the line around the circle, the outline, in pixels | -| Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the circle +| Tuple[int, int] or Tuple[float, float] | center_location | Center location using USER'S coordinate system | +| int or float | radius | Radius in user's coordinate values. | +| str | fill_color | color of the point to draw | +| str | line_color | color of the outer line that goes around the circle (sorry, can't set thickness) | +| int | line_width | width of the line around the circle, the outline, in pixels | +| int or None | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the circle ### DrawImage Places an image onto your canvas. It's a really important method for this element as it enables so much ``` -DrawImage(filename=None, - data=None, - location=(None, None)) +DrawImage(filename = None, + data = None, + location = (None, None)) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | filename | if image is in a file, path and filename for the image. (GIF and PNG only!) | -| Union[str, bytes] | data | if image is in Base64 format or raw? format then use instead of filename | -| Union[Tuple[int, int], Tuple[float, float]] | location | the (x,y) location to place image's top left corner | -| Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the image +| str | filename | if image is in a file, path and filename for the image. (GIF and PNG only!) | +| str or bytes | data | if image is in Base64 format or raw? format then use instead of filename | +| Tuple[int, int] or Tuple[float, float] | location | the (x,y) location to place image's top left corner | +| int or None | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the image ### DrawLine @@ -2165,19 +2244,19 @@ Draws a line from one point to another point using USER'S coordinates. Can set t ``` DrawLine(point_from, point_to, - color="black", - width=1) + color = "black", + width = 1) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[Tuple[int, int], Tuple[float, float]] | point_from | Starting point for line | -| Union[Tuple[int, int], Tuple[float, float]] | point_to | Ending point for line | -| str | color | Color of the line | -| int | width | width of line in pixels | -| Union[int, None] | **RETURN** | id returned from tktiner or None if user closed the window. id is used when you +| Tuple[int, int] or Tuple[float, float] | point_from | Starting point for line | +| Tuple[int, int] or Tuple[float, float] | point_to | Ending point for line | +| str | color | Color of the line | +| int | width | width of line in pixels | +| int or None | **RETURN** | id returned from tktiner or None if user closed the window. id is used when you ### DrawOval @@ -2186,21 +2265,21 @@ Draws an oval based on coordinates in user coordinate system. Provide the locati ``` DrawOval(top_left, bottom_right, - fill_color=None, - line_color=None, - line_width=1) + fill_color = None, + line_color = None, + line_width = 1) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[Tuple[int, int], Tuple[float, float]] | top_left | the top left point of bounding rectangle | -| Union[Tuple[int, int], Tuple[float, float]] | bottom_right | the bottom right point of bounding rectangle | -| str | fill_color | color of the interrior | -| str | line_color | color of outline of oval | -| int | line_width | width of the line around the oval, the outline, in pixels | -| Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the oval +| Tuple[int, int] or Tuple[float, float] | top_left | the top left point of bounding rectangle | +| Tuple[int, int] or Tuple[float, float] | bottom_right | the bottom right point of bounding rectangle | +| str | fill_color | color of the interrior | +| str | line_color | color of outline of oval | +| int | line_width | width of the line around the oval, the outline, in pixels | +| int or None | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the oval ### DrawPoint @@ -2208,18 +2287,18 @@ Draws a "dot" at the point you specify using the USER'S coordinate system ``` DrawPoint(point, - size=2, - color="black") + size = 2, + color = "black") ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union [Tuple[int, int], Tuple[float, float]] | point | Center location using USER'S coordinate system | -| Union[int, float] | size | Radius? (Or is it the diameter?) in user's coordinate values. | -| str | color | color of the point to draw | -| Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the point +| Tuple[int, int] or Tuple[float, float] | point | Center location using USER'S coordinate system | +| int or float | size | Radius? (Or is it the diameter?) in user's coordinate values. | +| str | color | color of the point to draw | +| int or None | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the point ### DrawPolygon @@ -2227,20 +2306,20 @@ Draw a polygon given list of points ``` DrawPolygon(points, - fill_color=None, - line_color=None, - line_width=None) + fill_color = None, + line_color = None, + line_width = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| List[Union[Tuple[int, int], Tuple[float, float]]] | points | list of points that define the polygon | -| str | fill_color | color of the interior | -| str | line_color | color of outline | -| int | line_width | width of the line in pixels | -| Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the rectangle +| List[Tuple[int, int] or Tuple[float, float]] | points | list of points that define the polygon | +| str | fill_color | color of the interior | +| str | line_color | color of outline | +| int | line_width | width of the line in pixels | +| int or None | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the rectangle ### DrawRectangle @@ -2249,21 +2328,21 @@ Draw a rectangle given 2 points. Can control the line and fill colors ``` DrawRectangle(top_left, bottom_right, - fill_color=None, - line_color=None, - line_width=None) + fill_color = None, + line_color = None, + line_width = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[Tuple[int, int], Tuple[float, float]] | top_left | the top left point of rectangle | -| Union[Tuple[int, int], Tuple[float, float]] | bottom_right | the bottom right point of rectangle | -| str | fill_color | color of the interior | -| str | line_color | color of outline | -| int | line_width | width of the line in pixels | -| Union[int, None] | **RETURN** | Union[int, None] id returned from tkinter that you'll need if you want to manipulate the rectangle +| Tuple[int, int] or Tuple[float, float] | top_left | the top left point of rectangle | +| Tuple[int, int] or Tuple[float, float] | bottom_right | the bottom right point of rectangle | +| str | fill_color | color of the interior | +| str | line_color | color of outline | +| int | line_width | width of the line in pixels | +| int or None | **RETURN** | int | None id returned from tkinter that you'll need if you want to manipulate the rectangle ### DrawText @@ -2272,23 +2351,23 @@ Draw some text on your graph. This is how you label graph number lines for exam ``` DrawText(text, location, - color="black", - font=None, - angle=0, - text_location="center") + color = "black", + font = None, + angle = 0, + text_location = "center") ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | text | text to display | -| Union[Tuple[int, int], Tuple[float, float]] | location | location to place first letter | -| str | color | text color | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| float | angle | Angle 0 to 360 to draw the text. Zero represents horizontal text | -| enum | text_location | "anchor" location for the text. Values start with TEXT_LOCATION_ | -| Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the text +| str | text | text to display | +| Tuple[int, int] or Tuple[float, float] | location | location to place first letter | +| str | color | text color | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| float | angle | Angle 0 to 360 to draw the text. Zero represents horizontal text | +| enum | text_location | "anchor" location for the text. Values start with TEXT_LOCATION_ | +| int or None | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the text ### Erase @@ -2311,7 +2390,7 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | object | figure | a previously drawing figure | -| Union[Tuple[int, int, int, int], Tuple[float, float, float, float]] | **RETURN** | upper left x, upper left y, lower right x, lower right y +| Tuple[int, int, int, int] or Tuple[float, float, float, float] | **RETURN** | upper left x, upper left y, lower right x, lower right y ### GetFiguresAtLocation @@ -2325,7 +2404,7 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[Tuple[int, int], Tuple[float, float]] | location | point to check | +| Tuple[int, int] or Tuple[float, float] | location | point to check | | List[int] | **RETURN** | a list of previously drawn "Figures" (returned from the drawing primitives) ### Move @@ -2340,8 +2419,8 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[int, float] | x_direction | how far to move in the "X" direction in your coordinates | -| Union[int, float] | y_direction | how far to move in the "Y" direction in your coordinates | +| int or float | x_direction | how far to move in the "X" direction in your coordinates | +| int or float | y_direction | how far to move in the "Y" direction in your coordinates | ### MoveFigure @@ -2357,9 +2436,9 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| id | figure | Previously obtained figure-id. These are returned from all Draw methods | -| Union[int, float] | x_direction | delta to apply to position in the X direction | -| Union[int, float] | y_direction | delta to apply to position in the Y direction | +| id | figure | Previously obtained figure-id. These are returned from all Draw methods | +| int or float | x_direction | delta to apply to position in the X direction | +| int or float | y_direction | delta to apply to position in the Y direction | ### RelocateFigure @@ -2376,9 +2455,9 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| id | figure | Previously obtained figure-id. These are returned from all Draw methods | -| Union[int, float] | x | location on X axis (in user coords) to move the upper left corner of the figure | -| Union[int, float] | y | location on Y axis (in user coords) to move the upper left corner of the figure | +| id | figure | Previously obtained figure-id. These are returned from all Draw methods | +| int or float | x | location on X axis (in user coords) to move the upper left corner of the figure | +| int or float | y | location on Y axis (in user coords) to move the upper left corner of the figure | ### SendFigureToBack @@ -2399,7 +2478,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -2437,7 +2516,7 @@ Returns the underlying tkiner Canvas widget Changes some of the settings for the Graph Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(background_color=None, visible=None) +Update(background_color = None, visible = None) ``` Parameter Descriptions: @@ -2516,22 +2595,24 @@ draw_arc(top_left, bottom_right, extent, start_angle, - style=None, - arc_color="black", - line_width=1) + style = None, + arc_color = "black", + line_width = 1, + fill_color = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[Tuple[int, int], Tuple[float, float]] | top_left | the top left point of bounding rectangle | -| Union[Tuple[int, int], Tuple[float, float]] | bottom_right | the bottom right point of bounding rectangle | -| float | extent | Andle to end drawing. Used in conjunction with start_angle | -| float | start_angle | Angle to begin drawing. Used in conjunction with extent | -| str | style | Valid choices are One of these Style strings- 'pieslice', 'chord', 'arc', 'first', 'last', 'butt', 'projecting', 'round', 'bevel', 'miter' | -| str | arc_color | color to draw arc with | -| Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the arc +| Tuple[int, int] or Tuple[float, float] | top_left | the top left point of bounding rectangle | +| Tuple[int, int] or Tuple[float, float] | bottom_right | the bottom right point of bounding rectangle | +| float | extent | Andle to end drawing. Used in conjunction with start_angle | +| float | start_angle | Angle to begin drawing. Used in conjunction with extent | +| str | style | Valid choices are One of these Style strings- 'pieslice', 'chord', 'arc', 'first', 'last', 'butt', 'projecting', 'round', 'bevel', 'miter' | +| str | arc_color | color to draw arc with | +| str | fill_color | color to fill the area | +| int or None | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the arc ### draw_circle @@ -2540,40 +2621,40 @@ Draws a circle, cenetered at the location provided. Can set the fill and outlin ``` draw_circle(center_location, radius, - fill_color=None, - line_color="black", - line_width=1) + fill_color = None, + line_color = "black", + line_width = 1) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union [Tuple[int, int], Tuple[float, float]] | center_location | Center location using USER'S coordinate system | -| Union[int, float] | radius | Radius in user's coordinate values. | -| str | fill_color | color of the point to draw | -| str | line_color | color of the outer line that goes around the circle (sorry, can't set thickness) | -| int | line_width | width of the line around the circle, the outline, in pixels | -| Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the circle +| Tuple[int, int] or Tuple[float, float] | center_location | Center location using USER'S coordinate system | +| int or float | radius | Radius in user's coordinate values. | +| str | fill_color | color of the point to draw | +| str | line_color | color of the outer line that goes around the circle (sorry, can't set thickness) | +| int | line_width | width of the line around the circle, the outline, in pixels | +| int or None | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the circle ### draw_image Places an image onto your canvas. It's a really important method for this element as it enables so much ``` -draw_image(filename=None, - data=None, - location=(None, None)) +draw_image(filename = None, + data = None, + location = (None, None)) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | filename | if image is in a file, path and filename for the image. (GIF and PNG only!) | -| Union[str, bytes] | data | if image is in Base64 format or raw? format then use instead of filename | -| Union[Tuple[int, int], Tuple[float, float]] | location | the (x,y) location to place image's top left corner | -| Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the image +| str | filename | if image is in a file, path and filename for the image. (GIF and PNG only!) | +| str or bytes | data | if image is in Base64 format or raw? format then use instead of filename | +| Tuple[int, int] or Tuple[float, float] | location | the (x,y) location to place image's top left corner | +| int or None | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the image ### draw_line @@ -2582,19 +2663,19 @@ Draws a line from one point to another point using USER'S coordinates. Can set t ``` draw_line(point_from, point_to, - color="black", - width=1) + color = "black", + width = 1) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[Tuple[int, int], Tuple[float, float]] | point_from | Starting point for line | -| Union[Tuple[int, int], Tuple[float, float]] | point_to | Ending point for line | -| str | color | Color of the line | -| int | width | width of line in pixels | -| Union[int, None] | **RETURN** | id returned from tktiner or None if user closed the window. id is used when you +| Tuple[int, int] or Tuple[float, float] | point_from | Starting point for line | +| Tuple[int, int] or Tuple[float, float] | point_to | Ending point for line | +| str | color | Color of the line | +| int | width | width of line in pixels | +| int or None | **RETURN** | id returned from tktiner or None if user closed the window. id is used when you ### draw_oval @@ -2603,21 +2684,21 @@ Draws an oval based on coordinates in user coordinate system. Provide the locati ``` draw_oval(top_left, bottom_right, - fill_color=None, - line_color=None, - line_width=1) + fill_color = None, + line_color = None, + line_width = 1) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[Tuple[int, int], Tuple[float, float]] | top_left | the top left point of bounding rectangle | -| Union[Tuple[int, int], Tuple[float, float]] | bottom_right | the bottom right point of bounding rectangle | -| str | fill_color | color of the interrior | -| str | line_color | color of outline of oval | -| int | line_width | width of the line around the oval, the outline, in pixels | -| Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the oval +| Tuple[int, int] or Tuple[float, float] | top_left | the top left point of bounding rectangle | +| Tuple[int, int] or Tuple[float, float] | bottom_right | the bottom right point of bounding rectangle | +| str | fill_color | color of the interrior | +| str | line_color | color of outline of oval | +| int | line_width | width of the line around the oval, the outline, in pixels | +| int or None | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the oval ### draw_point @@ -2625,18 +2706,18 @@ Draws a "dot" at the point you specify using the USER'S coordinate system ``` draw_point(point, - size=2, - color="black") + size = 2, + color = "black") ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union [Tuple[int, int], Tuple[float, float]] | point | Center location using USER'S coordinate system | -| Union[int, float] | size | Radius? (Or is it the diameter?) in user's coordinate values. | -| str | color | color of the point to draw | -| Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the point +| Tuple[int, int] or Tuple[float, float] | point | Center location using USER'S coordinate system | +| int or float | size | Radius? (Or is it the diameter?) in user's coordinate values. | +| str | color | color of the point to draw | +| int or None | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the point ### draw_polygon @@ -2644,20 +2725,20 @@ Draw a polygon given list of points ``` draw_polygon(points, - fill_color=None, - line_color=None, - line_width=None) + fill_color = None, + line_color = None, + line_width = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| List[Union[Tuple[int, int], Tuple[float, float]]] | points | list of points that define the polygon | -| str | fill_color | color of the interior | -| str | line_color | color of outline | -| int | line_width | width of the line in pixels | -| Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the rectangle +| List[Tuple[int, int] or Tuple[float, float]] | points | list of points that define the polygon | +| str | fill_color | color of the interior | +| str | line_color | color of outline | +| int | line_width | width of the line in pixels | +| int or None | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the rectangle ### draw_rectangle @@ -2666,21 +2747,21 @@ Draw a rectangle given 2 points. Can control the line and fill colors ``` draw_rectangle(top_left, bottom_right, - fill_color=None, - line_color=None, - line_width=None) + fill_color = None, + line_color = None, + line_width = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[Tuple[int, int], Tuple[float, float]] | top_left | the top left point of rectangle | -| Union[Tuple[int, int], Tuple[float, float]] | bottom_right | the bottom right point of rectangle | -| str | fill_color | color of the interior | -| str | line_color | color of outline | -| int | line_width | width of the line in pixels | -| Union[int, None] | **RETURN** | Union[int, None] id returned from tkinter that you'll need if you want to manipulate the rectangle +| Tuple[int, int] or Tuple[float, float] | top_left | the top left point of rectangle | +| Tuple[int, int] or Tuple[float, float] | bottom_right | the bottom right point of rectangle | +| str | fill_color | color of the interior | +| str | line_color | color of outline | +| int | line_width | width of the line in pixels | +| int or None | **RETURN** | int | None id returned from tkinter that you'll need if you want to manipulate the rectangle ### draw_text @@ -2689,23 +2770,23 @@ Draw some text on your graph. This is how you label graph number lines for exam ``` draw_text(text, location, - color="black", - font=None, - angle=0, - text_location="center") + color = "black", + font = None, + angle = 0, + text_location = "center") ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | text | text to display | -| Union[Tuple[int, int], Tuple[float, float]] | location | location to place first letter | -| str | color | text color | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| float | angle | Angle 0 to 360 to draw the text. Zero represents horizontal text | -| enum | text_location | "anchor" location for the text. Values start with TEXT_LOCATION_ | -| Union[int, None] | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the text +| str | text | text to display | +| Tuple[int, int] or Tuple[float, float] | location | location to place first letter | +| str | color | text color | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| float | angle | Angle 0 to 360 to draw the text. Zero represents horizontal text | +| enum | text_location | "anchor" location for the text. Values start with TEXT_LOCATION_ | +| int or None | **RETURN** | id returned from tkinter that you'll need if you want to manipulate the text ### erase @@ -2720,9 +2801,9 @@ erase() Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -2746,7 +2827,7 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | object | figure | a previously drawing figure | -| Union[Tuple[int, int, int, int], Tuple[float, float, float, float]] | **RETURN** | upper left x, upper left y, lower right x, lower right y +| Tuple[int, int, int, int] or Tuple[float, float, float, float] | **RETURN** | upper left x, upper left y, lower right x, lower right y ### get_figures_at_location @@ -2760,7 +2841,7 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[Tuple[int, int], Tuple[float, float]] | location | point to check | +| Tuple[int, int] or Tuple[float, float] | location | point to check | | List[int] | **RETURN** | a list of previously drawn "Figures" (returned from the drawing primitives) ### get_size @@ -2794,8 +2875,8 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[int, float] | x_direction | how far to move in the "X" direction in your coordinates | -| Union[int, float] | y_direction | how far to move in the "Y" direction in your coordinates | +| int or float | x_direction | how far to move in the "X" direction in your coordinates | +| int or float | y_direction | how far to move in the "Y" direction in your coordinates | ### move_figure @@ -2811,9 +2892,9 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| id | figure | Previously obtained figure-id. These are returned from all Draw methods | -| Union[int, float] | x_direction | delta to apply to position in the X direction | -| Union[int, float] | y_direction | delta to apply to position in the Y direction | +| id | figure | Previously obtained figure-id. These are returned from all Draw methods | +| int or float | x_direction | delta to apply to position in the X direction | +| int or float | y_direction | delta to apply to position in the Y direction | ### relocate_figure @@ -2830,9 +2911,9 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| id | figure | Previously obtained figure-id. These are returned from all Draw methods | -| Union[int, float] | x | location on X axis (in user coords) to move the upper left corner of the figure | -| Union[int, float] | y | location on Y axis (in user coords) to move the upper left corner of the figure | +| id | figure | Previously obtained figure-id. These are returned from all Draw methods | +| int or float | x | location on X axis (in user coords) to move the upper left corner of the figure | +| int or float | y | location on Y axis (in user coords) to move the upper left corner of the figure | ### send_figure_to_back @@ -2867,7 +2948,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -2882,7 +2963,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -2943,7 +3024,7 @@ unhide_row() Changes some of the settings for the Graph Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(background_color=None, visible=None) +update(background_color = None, visible = None) ``` Parameter Descriptions: @@ -2953,32 +3034,43 @@ Parameter Descriptions: | ??? | background_color | color of background | | bool | visible | control visibility of element | +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +|| **return** | Visibility state for element | + ## HorizontalSeparator Element Horizontal Separator Element draws a Horizontal line at the given location. ``` -HorizontalSeparator(color=None, - pad=None, - key=None, - k=None) +HorizontalSeparator(color = None, + pad = None, + key = None, + k = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | color | Color of the line. Defaults to theme's text color. Can be name or #RRGGBB format | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| Union[str, int, tuple, object] | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | color | Color of the line. Defaults to theme's text color. Can be name or #RRGGBB format | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str or int or tuple or object | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | ### SetFocus Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -3022,9 +3114,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -3073,7 +3165,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -3088,7 +3180,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -3134,48 +3226,59 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + ## Image Element Image Element - show an image in the window. Should be a GIF or a PNG only ``` -Image(filename=None, - data=None, - background_color=None, - size=(None, None), - pad=None, - key=None, - k=None, - tooltip=None, - right_click_menu=None, - visible=True, - enable_events=False, - metadata=None) +Image(filename = None, + data = None, + background_color = None, + size = (None, None), + pad = None, + key = None, + k = None, + tooltip = None, + right_click_menu = None, + visible = True, + enable_events = False, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | filename | image filename if there is a button image. GIFs and PNGs only. | -| Union[bytes, str] | data | Raw or Base64 representation of the image to put on button. Choose either filename or data | -| | background_color | color of background | -| (int, int) | size | (width, height) size of image in pixels | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| str | tooltip | text, that will appear when mouse hovers over the element | -| List[List[Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| bool | visible | set visibility state of the element | -| bool | enable_events | Turns on the element specific events. For an Image element, the event is "image clicked" | -| Any | metadata | User metadata that can be set to ANYTHING | +| str or None | filename | image filename if there is a button image. GIFs and PNGs only. | +| bytes or str or None | data | Raw or Base64 representation of the image to put on button. Choose either filename or data | +| | background_color | color of background | +| (int, int) | size | (width, height) size of image in pixels | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | tooltip | text, that will appear when mouse hovers over the element | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| bool | visible | set visibility state of the element | +| bool | enable_events | Turns on the element specific events. For an Image element, the event is "image clicked" | +| Any | metadata | User metadata that can be set to ANYTHING | ### SetFocus Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -3205,20 +3308,20 @@ To clear an image that's been displayed, call with NONE of the options set. A b delete the previously shown image. ``` -Update(filename=None, - data=None, - size=(None, None), - visible=None) +Update(filename = None, + data = None, + size = (None, None), + visible = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | filename | filename to the new image to display. | -| Union[str, tkPhotoImage] | data | Base64 encoded string OR a tk.PhotoImage object | -| Tuple[int,int] | size | size of a image (w,h) w=characters-wide, h=rows-high | -| bool | visible | control visibility of element | +| str | filename | filename to the new image to display. | +| str or tkPhotoImage | data | Base64 encoded string OR a tk.PhotoImage object | +| Tuple[int,int] | size | size of a image (w,h) w=characters-wide, h=rows-high | +| bool | visible | control visibility of element | ### UpdateAnimation @@ -3226,15 +3329,15 @@ Show an Animated GIF. Call the function as often as you like. The function will NOTE - does NOT perform a sleep call to delay ``` -UpdateAnimation(source, time_between_frames=0) +UpdateAnimation(source, time_between_frames = 0) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[str,bytes] | source | Filename or Base64 encoded string containing Animated GIF | -| int | time_between_frames | Number of milliseconds to wait between showing frames | +| str or bytes | source | Filename or Base64 encoded string containing Animated GIF | +| int | time_between_frames | Number of milliseconds to wait between showing frames | ### bind @@ -3257,9 +3360,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -3308,7 +3411,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -3323,7 +3426,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -3376,20 +3479,20 @@ To clear an image that's been displayed, call with NONE of the options set. A b delete the previously shown image. ``` -update(filename=None, - data=None, - size=(None, None), - visible=None) +update(filename = None, + data = None, + size = (None, None), + visible = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | filename | filename to the new image to display. | -| Union[str, tkPhotoImage] | data | Base64 encoded string OR a tk.PhotoImage object | -| Tuple[int,int] | size | size of a image (w,h) w=characters-wide, h=rows-high | -| bool | visible | control visibility of element | +| str | filename | filename to the new image to display. | +| str or tkPhotoImage | data | Base64 encoded string OR a tk.PhotoImage object | +| Tuple[int,int] | size | size of a image (w,h) w=characters-wide, h=rows-high | +| bool | visible | control visibility of element | ### update_animation @@ -3397,15 +3500,15 @@ Show an Animated GIF. Call the function as often as you like. The function will NOTE - does NOT perform a sleep call to delay ``` -update_animation(source, time_between_frames=0) +update_animation(source, time_between_frames = 0) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[str,bytes] | source | Filename or Base64 encoded string containing Animated GIF | -| int | time_between_frames | Number of milliseconds to wait between showing frames | +| str or bytes | source | Filename or Base64 encoded string containing Animated GIF | +| int | time_between_frames | Number of milliseconds to wait between showing frames | ### update_animation_no_buffering @@ -3413,75 +3516,86 @@ Show an Animated GIF. Call the function as often as you like. The function will NOTE - does NOT perform a sleep call to delay ``` -update_animation_no_buffering(source, time_between_frames=0) +update_animation_no_buffering(source, time_between_frames = 0) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[str,bytes] | source | Filename or Base64 encoded string containing Animated GIF | -| int | time_between_frames | Number of milliseconds to wait between showing frames | +| str or bytes | source | Filename or Base64 encoded string containing Animated GIF | +| int | time_between_frames | Number of milliseconds to wait between showing frames | -## InputText Element +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + +## Input Element Display a single text input field. Based on the tkinter Widget `Entry` ``` -InputText(default_text="", - size=(None, None), - disabled=False, - password_char="", - justification=None, - background_color=None, - text_color=None, - font=None, - tooltip=None, - border_width=None, - change_submits=False, - enable_events=False, - do_not_clear=True, - key=None, - k=None, - focus=False, - pad=None, - use_readonly_for_disable=True, - readonly=False, - disabled_readonly_background_color=None, - disabled_readonly_text_color=None, - right_click_menu=None, - visible=True, - metadata=None) +Input(default_text = "", + size = (None, None), + disabled = False, + password_char = "", + justification = None, + background_color = None, + text_color = None, + font = None, + tooltip = None, + border_width = None, + change_submits = False, + enable_events = False, + do_not_clear = True, + key = None, + k = None, + focus = False, + pad = None, + use_readonly_for_disable = True, + readonly = False, + disabled_readonly_background_color = None, + disabled_readonly_text_color = None, + right_click_menu = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | default_text | Text initially shown in the input box as a default value(Default value = ''). Will automatically be converted to string | -| (int, int) (width, height) | size | w=characters-wide, h=rows-high | -| bool | disabled | set disable state for element (Default = False) | -| char | password_char | Password character if this is a password field (Default value = '') | -| str | justification | justification for data display. Valid choices - left, right, center | -| str | background_color | color of background in one of the color formats | -| str | text_color | color of the text | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str | tooltip | text, that will appear when mouse hovers over the element | -| int | border_width | width of border around element in pixels | -| bool | change_submits | * DEPRICATED DO NOT USE. Use `enable_events` instead | -| bool | enable_events | If True then changes to this element are immediately reported as an event. Use this instead of change_submits (Default = False) | -| bool | do_not_clear | If False then the field will be set to blank after ANY event (button, any event) (Default = True) | -| Union[str, int, tuple, object] | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| bool | focus | Determines if initial focus should go to this element. | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element. Normally (horizontal pixels, vertical pixels) but can be split apart further into ((horizontal left, horizontal right), (vertical above, vertical below)) | -| bool | use_readonly_for_disable | If True (the default) tkinter state set to 'readonly'. Otherwise state set to 'disabled' | -| bool | readonly | If True tkinter state set to 'readonly'. Use this in place of use_readonly_for_disable as another way of achieving readonly. Note cannot set BOTH readonly and disabled as tkinter only supplies a single flag | -| str | disabled_readonly_background_color | If state is set to readonly or disabled, the color to use for the background | -| str | disabled_readonly_text_color | If state is set to readonly or disabled, the color to use for the text | -| List[List[Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| bool | visible | set visibility state of the element (Default = True) | -| Any | metadata | User metadata that can be set to ANYTHING | +| Any | default_text | Text initially shown in the input box as a default value(Default value = ''). Will automatically be converted to string | +| (int, int) (width, height) | size | w=characters-wide, h=rows-high | +| bool | disabled | set disable state for element (Default = False) | +| char | password_char | Password character if this is a password field (Default value = '') | +| str | justification | justification for data display. Valid choices - left, right, center | +| str | background_color | color of background in one of the color formats | +| str | text_color | color of the text | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str | tooltip | text, that will appear when mouse hovers over the element | +| int | border_width | width of border around element in pixels | +| bool | change_submits | * DEPRICATED DO NOT USE. Use `enable_events` instead | +| bool | enable_events | If True then changes to this element are immediately reported as an event. Use this instead of change_submits (Default = False) | +| bool | do_not_clear | If False then the field will be set to blank after ANY event (button, any event) (Default = True) | +| str or int or tuple or object | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| bool | focus | Determines if initial focus should go to this element. | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element. Normally (horizontal pixels, vertical pixels) but can be split apart further into ((horizontal left, horizontal right), (vertical above, vertical below)) | +| bool | use_readonly_for_disable | If True (the default) tkinter state set to 'readonly'. Otherwise state set to 'disabled' | +| bool | readonly | If True tkinter state set to 'readonly'. Use this in place of use_readonly_for_disable as another way of achieving readonly. Note cannot set BOTH readonly and disabled as tkinter only supplies a single flag | +| str | disabled_readonly_background_color | If state is set to readonly or disabled, the color to use for the background | +| str | disabled_readonly_text_color | If state is set to readonly or disabled, the color to use for the text | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| bool | visible | set visibility state of the element (Default = True) | +| Any | metadata | User metadata that can be set to ANYTHING | ### Get @@ -3498,7 +3612,7 @@ Read and return the current value of the input element. Must call `Window.Read` Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -3526,26 +3640,26 @@ Parameter Descriptions: Changes some of the settings for the Input Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(value=None, - disabled=None, - select=None, - visible=None, - text_color=None, - background_color=None, - move_cursor_to="end") +Update(value = None, + disabled = None, + select = None, + visible = None, + text_color = None, + background_color = None, + move_cursor_to = "end") ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | value | new text to display as default text in Input field | -| bool | disabled | disable or enable state of the element (sets Entry Widget to readonly or normal) | -| bool | select | if True, then the text will be selected | -| bool | visible | change visibility of element | -| str | text_color | change color of text being typed | -| str | background_color | change color of the background | -| Union[int, str] | move_cursor_to | Moves the cursor to a particular offset. Defaults to 'end' | +| str | value | new text to display as default text in Input field | +| bool | disabled | disable or enable state of the element (sets Entry Widget to readonly or normal) | +| bool | select | if True, then the text will be selected | +| bool | visible | change visibility of element | +| str | text_color | change color of text being typed | +| str | background_color | change color of the background | +| int or str | move_cursor_to | Moves the cursor to a particular offset. Defaults to 'end' | ### bind @@ -3568,9 +3682,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -3629,7 +3743,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -3644,7 +3758,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -3667,6 +3781,20 @@ Parameter Descriptions: |--|--|--| | str | tooltip_text | the text to show in tooltip. | +### set_vscroll_position + +Attempts to set the vertical scroll postition for an element's Widget + +``` +set_vscroll_position(percent_from_top) +``` + +Parameter Descriptions: + +|Type|Name|Meaning| +|--|--|--| +| float | percent_from_top | From 0 to 1.0, the percentage from the top to move scrollbar to | + ### unbind Removes a previously bound tkinter event from an Element. @@ -3695,26 +3823,37 @@ unhide_row() Changes some of the settings for the Input Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(value=None, - disabled=None, - select=None, - visible=None, - text_color=None, - background_color=None, - move_cursor_to="end") +update(value = None, + disabled = None, + select = None, + visible = None, + text_color = None, + background_color = None, + move_cursor_to = "end") ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | value | new text to display as default text in Input field | -| bool | disabled | disable or enable state of the element (sets Entry Widget to readonly or normal) | -| bool | select | if True, then the text will be selected | -| bool | visible | change visibility of element | -| str | text_color | change color of text being typed | -| str | background_color | change color of the background | -| Union[int, str] | move_cursor_to | Moves the cursor to a particular offset. Defaults to 'end' | +| str | value | new text to display as default text in Input field | +| bool | disabled | disable or enable state of the element (sets Entry Widget to readonly or normal) | +| bool | select | if True, then the text will be selected | +| bool | visible | change visibility of element | +| str | text_color | change color of text being typed | +| str | background_color | change color of the background | +| int or str | move_cursor_to | Moves the cursor to a particular offset. Defaults to 'end' | + +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | ## Listbox Element @@ -3723,51 +3862,51 @@ Parameter Descriptions: ``` Listbox(values, - default_values=None, - select_mode=None, - change_submits=False, - enable_events=False, - bind_return_key=False, - size=(None, None), - disabled=False, - auto_size_text=None, - font=None, - no_scrollbar=False, - background_color=None, - text_color=None, - key=None, - k=None, - pad=None, - tooltip=None, - right_click_menu=None, - visible=True, - metadata=None) + default_values = None, + select_mode = None, + change_submits = False, + enable_events = False, + bind_return_key = False, + size = (None, None), + disabled = False, + auto_size_text = None, + font = None, + no_scrollbar = False, + background_color = None, + text_color = None, + key = None, + k = None, + pad = None, + tooltip = None, + right_click_menu = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| List[Any] or Tuple[Any] | values | list of values to display. Can be any type including mixed types as long as they have __str__ method | -| List[Any] | default_values | which values should be initially selected | -| [enum] | select_mode | Select modes are used to determine if only 1 item can be selected or multiple and how they can be selected. Valid choices begin with "LISTBOX_SELECT_MODE_" and include: LISTBOX_SELECT_MODE_SINGLE LISTBOX_SELECT_MODE_MULTIPLE LISTBOX_SELECT_MODE_BROWSE LISTBOX_SELECT_MODE_EXTENDED | -| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | -| bool | enable_events | Turns on the element specific events. Listbox generates events when an item is clicked | -| bool | bind_return_key | If True, then the return key will cause a the Listbox to generate an event | -| Tuple(int, int) (width, height) | size | width = characters-wide, height = rows-high | -| bool | disabled | set disable state for element | -| bool | auto_size_text | True if element should be the same size as the contents | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| ??? (bool) | font | specifies the font family, size, etc :param no_scrollbar: ??? | -| str | background_color | color of background | -| str | text_color | color of the text | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| str | tooltip | text, that will appear when mouse hovers over the element | -| List[List[Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| List[Any] or Tuple[Any] | values | list of values to display. Can be any type including mixed types as long as they have __str__ method | +| List[Any] | default_values | which values should be initially selected | +| [enum] | select_mode | Select modes are used to determine if only 1 item can be selected or multiple and how they can be selected. Valid choices begin with "LISTBOX_SELECT_MODE_" and include: LISTBOX_SELECT_MODE_SINGLE LISTBOX_SELECT_MODE_MULTIPLE LISTBOX_SELECT_MODE_BROWSE LISTBOX_SELECT_MODE_EXTENDED | +| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | +| bool | enable_events | Turns on the element specific events. Listbox generates events when an item is clicked | +| bool | bind_return_key | If True, then the return key will cause a the Listbox to generate an event | +| Tuple(int, int) (width, height) | size | width = characters-wide, height = rows-high | +| bool | disabled | set disable state for element | +| bool | auto_size_text | True if element should be the same size as the contents | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| ??? (bool) | font | specifies the font family, size, etc :param no_scrollbar: ??? | +| str | background_color | color of background | +| str | text_color | color of the text | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str | tooltip | text, that will appear when mouse hovers over the element | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### GetIndexes @@ -3794,7 +3933,7 @@ Returns list of Values provided by the user in the user's format Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -3836,24 +3975,24 @@ Parameter Descriptions: Changes some of the settings for the Listbox Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(values=None, - disabled=None, - set_to_index=None, - scroll_to_index=None, - select_mode=None, - visible=None) +Update(values = None, + disabled = None, + set_to_index = None, + scroll_to_index = None, + select_mode = None, + visible = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| List[Any] | values | new list of choices to be shown to user | -| bool | disabled | disable or enable state of the element | -| Union[int, list, tuple] | set_to_index | highlights the item(s) indicated. If parm is an int one entry will be set. If is a list, then each entry in list is highlighted | -| int | scroll_to_index | scroll the listbox so that this index is the first shown | -| str | mode | changes the select mode according to tkinter's listbox widget | -| bool | visible | control visibility of element | +| List[Any] | values | new list of choices to be shown to user | +| bool | disabled | disable or enable state of the element | +| int or list or tuple | set_to_index | highlights the item(s) indicated. If parm is an int one entry will be set. If is a list, then each entry in list is highlighted | +| int | scroll_to_index | scroll the listbox so that this index is the first shown | +| str | mode | changes the select mode according to tkinter's listbox widget | +| bool | visible | control visibility of element | ### bind @@ -3876,9 +4015,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -3958,7 +4097,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -3973,7 +4112,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -4052,24 +4191,35 @@ unhide_row() Changes some of the settings for the Listbox Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(values=None, - disabled=None, - set_to_index=None, - scroll_to_index=None, - select_mode=None, - visible=None) +update(values = None, + disabled = None, + set_to_index = None, + scroll_to_index = None, + select_mode = None, + visible = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| List[Any] | values | new list of choices to be shown to user | -| bool | disabled | disable or enable state of the element | -| Union[int, list, tuple] | set_to_index | highlights the item(s) indicated. If parm is an int one entry will be set. If is a list, then each entry in list is highlighted | -| int | scroll_to_index | scroll the listbox so that this index is the first shown | -| str | mode | changes the select mode according to tkinter's listbox widget | -| bool | visible | control visibility of element | +| List[Any] | values | new list of choices to be shown to user | +| bool | disabled | disable or enable state of the element | +| int or list or tuple | set_to_index | highlights the item(s) indicated. If parm is an int one entry will be set. If is a list, then each entry in list is highlighted | +| int | scroll_to_index | scroll the listbox so that this index is the first shown | +| str | mode | changes the select mode according to tkinter's listbox widget | +| bool | visible | control visibility of element | + +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | ## Menu Element @@ -4090,42 +4240,42 @@ Parameter Descriptions: ``` Menu(menu_definition, - background_color=None, - text_color=None, - disabled_text_color=None, - size=(None, None), - tearoff=False, - font=None, - pad=None, - key=None, - k=None, - visible=True, - metadata=None) + background_color = None, + text_color = None, + disabled_text_color = None, + size = (None, None), + tearoff = False, + font = None, + pad = None, + key = None, + k = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| List[List[Tuple[str, List[str]]] | menu_definition | The Menu definition specified using lists (docs explain the format) | -| str | background_color | color of the background | -| str | text_color | element's text color. Can be in #RRGGBB format or a color name "black" | -| str | disabled_text_color | color to use for text when item is disabled. Can be in #RRGGBB format or a color name "black" | -| (int, int) | size | Not used in the tkinter port | -| bool | tearoff | if True, then can tear the menu off from the window ans use as a floating window. Very cool effect | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| Union[str, int, tuple, object] | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| List[List[Tuple[str, List[str]]] | menu_definition | The Menu definition specified using lists (docs explain the format) | +| str | background_color | color of the background | +| str | text_color | element's text color. Can be in #RRGGBB format or a color name "black" | +| str | disabled_text_color | color to use for text when item is disabled. Can be in #RRGGBB format or a color name "black" | +| (int, int) | size | Not used in the tkinter port | +| bool | tearoff | if True, then can tear the menu off from the window ans use as a floating window. Very cool effect | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str or int or tuple or object | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### SetFocus Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -4153,7 +4303,7 @@ Parameter Descriptions: Update a menubar - can change the menu definition and visibility. The entire menu has to be specified ``` -Update(menu_definition=None, visible=None) +Update(menu_definition = None, visible = None) ``` Parameter Descriptions: @@ -4184,9 +4334,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -4235,7 +4385,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -4250,7 +4400,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -4301,7 +4451,7 @@ unhide_row() Update a menubar - can change the menu definition and visibility. The entire menu has to be specified ``` -update(menu_definition=None, visible=None) +update(menu_definition = None, visible = None) ``` Parameter Descriptions: @@ -4311,6 +4461,17 @@ Parameter Descriptions: | List[List[Tuple[str, List[str]]] | menu_definition | ??? | | bool | visible | control visibility of element | +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + ## Multiline Element Multiline Element - Display and/or read multiple lines of text. This is both an input and output element. @@ -4318,68 +4479,68 @@ Parameter Descriptions: one up in the future too. ``` -Multiline(default_text="", - enter_submits=False, - disabled=False, - autoscroll=False, - border_width=None, - size=(None, None), - auto_size_text=None, - background_color=None, - text_color=None, - change_submits=False, - enable_events=False, - do_not_clear=True, - key=None, - k=None, - write_only=False, - auto_refresh=False, - reroute_stdout=False, - reroute_stderr=False, - reroute_cprint=False, - echo_stdout_stderr=False, - focus=False, - font=None, - pad=None, - tooltip=None, - justification=None, - right_click_menu=None, - visible=True, - metadata=None) +Multiline(default_text = "", + enter_submits = False, + disabled = False, + autoscroll = False, + border_width = None, + size = (None, None), + auto_size_text = None, + background_color = None, + text_color = None, + change_submits = False, + enable_events = False, + do_not_clear = True, + key = None, + k = None, + write_only = False, + auto_refresh = False, + reroute_stdout = False, + reroute_stderr = False, + reroute_cprint = False, + echo_stdout_stderr = False, + focus = False, + font = None, + pad = None, + tooltip = None, + justification = None, + right_click_menu = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | default_text | Initial text to show | -| bool | enter_submits | if True, the Window.Read call will return is enter key is pressed in this element | -| bool | disabled | set disable state | -| bool | autoscroll | If True the contents of the element will automatically scroll as more data added to the end | -| int | border_width | width of border around element in pixels | -| (int, int) | size | (width, height) width = characters-wide, height = rows-high | -| bool | auto_size_text | if True will size the element to match the length of the text | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | -| bool | enable_events | Turns on the element specific events. Spin events happen when an item changes | -| bool | do_not_clear | if False the element will be cleared any time the Window.Read call returns | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| bool | write_only | If True then no entry will be added to the values dictionary when the window is read | -| bool | auto_refresh | If True then anytime the element is updated, the window will be refreshed so that the change is immediately displayed | -| bool | reroute_stdout | If True then all output to stdout will be output to this element | -| bool | reroute_stderr | If True then all output to stderr will be output to this element | -| bool | reroute_cprint | If True your cprint calls will output to this element. It's the same as you calling cprint_set_output_destination | -| bool | echo_stdout_stderr | If True then output to stdout and stderr will be output to this element AND also to the normal console location | -| bool | focus | if True initial focus will go to this element | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| str | tooltip | text, that will appear when mouse hovers over the element | -| str | justification | text justification. left, right, center. Can use single characters l, r, c. | -| List[List[Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| str | default_text | Initial text to show | +| bool | enter_submits | if True, the Window.Read call will return is enter key is pressed in this element | +| bool | disabled | set disable state | +| bool | autoscroll | If True the contents of the element will automatically scroll as more data added to the end | +| int | border_width | width of border around element in pixels | +| (int, int) | size | (width, height) width = characters-wide, height = rows-high | +| bool | auto_size_text | if True will size the element to match the length of the text | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | +| bool | enable_events | Turns on the element specific events. Spin events happen when an item changes | +| bool | do_not_clear | if False the element will be cleared any time the Window.Read call returns | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| bool | write_only | If True then no entry will be added to the values dictionary when the window is read | +| bool | auto_refresh | If True then anytime the element is updated, the window will be refreshed so that the change is immediately displayed | +| bool | reroute_stdout | If True then all output to stdout will be output to this element | +| bool | reroute_stderr | If True then all output to stderr will be output to this element | +| bool | reroute_cprint | If True your cprint calls will output to this element. It's the same as you calling cprint_set_output_destination | +| bool | echo_stdout_stderr | If True then output to stdout and stderr will be output to this element AND also to the normal console location | +| bool | focus | if True initial focus will go to this element | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str | tooltip | text, that will appear when mouse hovers over the element | +| str | justification | text justification. left, right, center. Can use single characters l, r, c. | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### Get @@ -4396,7 +4557,7 @@ Return current contents of the Multiline Element Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -4424,34 +4585,34 @@ Parameter Descriptions: Changes some of the settings for the Multiline Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(value=None, - disabled=None, - append=False, - font=None, - text_color=None, - background_color=None, - text_color_for_value=None, - background_color_for_value=None, - visible=None, - autoscroll=None, - justification=None) +Update(value = None, + disabled = None, + append = False, + font = None, + text_color = None, + background_color = None, + text_color_for_value = None, + background_color_for_value = None, + visible = None, + autoscroll = None, + justification = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | value | new text to display | -| bool | disabled | disable or enable state of the element | -| bool | append | if True then new value will be added onto the end of the current value. if False then contents will be replaced. | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str | text_color | color of the text | -| str | background_color | color of background | -| str | text_color_for_value | color of the new text being added (the value paramter) | -| str | background_color_for_value | color of the new background of the text being added (the value paramter) | -| bool | visible | set visibility state of the element | -| bool | autoscroll | if True then contents of element are scrolled down when new text is added to the end | -| str | justification | text justification. left, right, center. Can use single characters l, r, c. Sets only for this value, not entire element | +| str | value | new text to display | +| bool | disabled | disable or enable state of the element | +| bool | append | if True then new value will be added onto the end of the current value. if False then contents will be replaced. | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str | text_color | color of the text | +| str | background_color | color of background | +| str | text_color_for_value | color of the new text being added (the value paramter) | +| str | background_color_for_value | color of the new background of the text being added (the value paramter) | +| bool | visible | set visibility state of the element | +| bool | autoscroll | if True then contents of element are scrolled down when new text is added to the end | +| str | justification | text justification. left, right, center. Can use single characters l, r, c. Sets only for this value, not entire element | ### bind @@ -4474,9 +4635,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -4522,11 +4683,11 @@ Print like Python normally prints except route the output to a multline element ``` print(args=*<1 or N object>, - end=None, - sep=None, - text_color=None, - background_color=None, - justification=None) + end = None, + sep = None, + text_color = None, + background_color = None, + justification = None) ``` Parameter Descriptions: @@ -4591,7 +4752,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -4606,7 +4767,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -4671,34 +4832,45 @@ unhide_row() Changes some of the settings for the Multiline Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(value=None, - disabled=None, - append=False, - font=None, - text_color=None, - background_color=None, - text_color_for_value=None, - background_color_for_value=None, - visible=None, - autoscroll=None, - justification=None) +update(value = None, + disabled = None, + append = False, + font = None, + text_color = None, + background_color = None, + text_color_for_value = None, + background_color_for_value = None, + visible = None, + autoscroll = None, + justification = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | value | new text to display | -| bool | disabled | disable or enable state of the element | -| bool | append | if True then new value will be added onto the end of the current value. if False then contents will be replaced. | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str | text_color | color of the text | -| str | background_color | color of background | -| str | text_color_for_value | color of the new text being added (the value paramter) | -| str | background_color_for_value | color of the new background of the text being added (the value paramter) | -| bool | visible | set visibility state of the element | -| bool | autoscroll | if True then contents of element are scrolled down when new text is added to the end | -| str | justification | text justification. left, right, center. Can use single characters l, r, c. Sets only for this value, not entire element | +| str | value | new text to display | +| bool | disabled | disable or enable state of the element | +| bool | append | if True then new value will be added onto the end of the current value. if False then contents will be replaced. | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str | text_color | color of the text | +| str | background_color | color of background | +| str | text_color_for_value | color of the new text being added (the value paramter) | +| str | background_color_for_value | color of the new background of the text being added (the value paramter) | +| bool | visible | set visibility state of the element | +| bool | autoscroll | if True then contents of element are scrolled down when new text is added to the end | +| str | justification | text justification. left, right, center. Can use single characters l, r, c. Sets only for this value, not entire element | + +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | ## OptionMenu Element @@ -4709,44 +4881,44 @@ Parameter Descriptions: ``` OptionMenu(values, - default_value=None, - size=(None, None), - disabled=False, - auto_size_text=None, - background_color=None, - text_color=None, - key=None, - k=None, - pad=None, - tooltip=None, - visible=True, - metadata=None) + default_value = None, + size = (None, None), + disabled = False, + auto_size_text = None, + background_color = None, + text_color = None, + key = None, + k = None, + pad = None, + tooltip = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| List[Any] or Tuple[Any] | values | Values to be displayed | -| Any | default_value | the value to choose by default | -| (int, int) (width, height) | size | size in characters (wide) and rows (high) | -| bool | disabled | control enabled / disabled | -| bool | auto_size_text | True if size of Element should match the contents of the items | -| str | background_color | color of background | -| str | text_color | color of the text | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| str | tooltip | text that will appear when mouse hovers over this element | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| List[Any] or Tuple[Any] | values | Values to be displayed | +| Any | default_value | the value to choose by default | +| (int, int) (width, height) | size | size in characters (wide) and rows (high) | +| bool | disabled | control enabled / disabled | +| bool | auto_size_text | True if size of Element should match the contents of the items | +| str | background_color | color of background | +| str | text_color | color of the text | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str | tooltip | text that will appear when mouse hovers over this element | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### SetFocus Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -4774,10 +4946,10 @@ Parameter Descriptions: Changes some of the settings for the OptionMenu Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(value=None, - values=None, - disabled=None, - visible=None) +Update(value = None, + values = None, + disabled = None, + visible = None) ``` Parameter Descriptions: @@ -4810,9 +4982,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -4861,7 +5033,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -4876,7 +5048,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -4941,10 +5113,10 @@ unhide_row() Changes some of the settings for the OptionMenu Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(value=None, - values=None, - disabled=None, - visible=None) +update(value = None, + values = None, + disabled = None, + visible = None) ``` Parameter Descriptions: @@ -4956,41 +5128,52 @@ Parameter Descriptions: | bool | disabled | disable or enable state of the element | | bool | visible | control visibility of element | +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + ## Output Element Output Element - a multi-lined text area where stdout and stderr are re-routed to. ``` -Output(size=(None, None), - background_color=None, - text_color=None, - pad=None, - echo_stdout_stderr=False, - font=None, - tooltip=None, - key=None, - k=None, - right_click_menu=None, - visible=True, - metadata=None) +Output(size = (None, None), + background_color = None, + text_color = None, + pad = None, + echo_stdout_stderr = False, + font = None, + tooltip = None, + key = None, + k = None, + right_click_menu = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| (int, int) | size | (width, height) w=characters-wide, h=rows-high | -| str | background_color | color of background | -| str | text_color | color of the text | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| bool | echo_stdout_stderr | If True then output to stdout will be output to this element AND also to the normal console location | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str | tooltip | text, that will appear when mouse hovers over the element | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| List[List[Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| (int, int) | size | (width, height) w=characters-wide, h=rows-high | +| str | background_color | color of background | +| str | text_color | color of the text | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| bool | echo_stdout_stderr | If True then output to stdout will be output to this element AND also to the normal console location | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str | tooltip | text, that will appear when mouse hovers over the element | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### Get @@ -5007,7 +5190,7 @@ Returns the current contents of the output. Similar to Get method other Element Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -5045,7 +5228,7 @@ Returns the TKOutput object used to create the element Changes some of the settings for the Output Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(value=None, visible=None) +Update(value = None, visible = None) ``` Parameter Descriptions: @@ -5076,9 +5259,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -5126,7 +5309,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -5141,7 +5324,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -5216,7 +5399,7 @@ unhide_row() Changes some of the settings for the Output Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(value=None, visible=None) +update(value = None, visible = None) ``` Parameter Descriptions: @@ -5226,50 +5409,61 @@ Parameter Descriptions: | str | value | string that will replace current contents of the output area | | bool | visible | control visibility of element | +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + ## Pane Element A sliding Pane that is unique to tkinter. Uses Columns to create individual panes ``` Pane(pane_list, - background_color=None, - size=(None, None), - pad=None, - orientation="vertical", - show_handle=True, - relief="raised", - handle_size=None, - border_width=None, - key=None, - k=None, - visible=True, - metadata=None) + background_color = None, + size = (None, None), + pad = None, + orientation = "vertical", + show_handle = True, + relief = "raised", + handle_size = None, + border_width = None, + key = None, + k = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| List[Column] | pane_list | Must be a list of Column Elements. Each Column supplied becomes one pane that's shown | -| str | background_color | color of background | -| (int, int) | size | (width, height) w=characters-wide, h=rows-high How much room to reserve for the Pane | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| str | orientation | 'horizontal' or 'vertical' or ('h' or 'v'). Direction the Pane should slide | -| bool | show_handle | if True, the handle is drawn that makes it easier to grab and slide | -| enum | relief | relief style. Values are same as other elements that use relief values. RELIEF_RAISED RELIEF_SUNKEN RELIEF_FLAT RELIEF_RIDGE RELIEF_GROOVE RELIEF_SOLID | -| int | handle_size | Size of the handle in pixels | -| int | border_width | width of border around element in pixels | -| Union[str, int, tuple, object] | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| List[Column] | pane_list | Must be a list of Column Elements. Each Column supplied becomes one pane that's shown | +| str | background_color | color of background | +| (int, int) | size | (width, height) w=characters-wide, h=rows-high How much room to reserve for the Pane | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str | orientation | 'horizontal' or 'vertical' or ('h' or 'v'). Direction the Pane should slide | +| bool | show_handle | if True, the handle is drawn that makes it easier to grab and slide | +| enum | relief | relief style. Values are same as other elements that use relief values. RELIEF_RAISED RELIEF_SUNKEN RELIEF_FLAT RELIEF_RIDGE RELIEF_GROOVE RELIEF_SOLID | +| int | handle_size | Size of the handle in pixels | +| int | border_width | width of border around element in pixels | +| str or int or tuple or object | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### SetFocus Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -5297,7 +5491,7 @@ Parameter Descriptions: Changes some of the settings for the Pane Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(visible=None) +Update(visible = None) ``` Parameter Descriptions: @@ -5327,9 +5521,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -5378,7 +5572,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -5393,7 +5587,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -5444,7 +5638,7 @@ unhide_row() Changes some of the settings for the Pane Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(visible=None) +update(visible = None) ``` Parameter Descriptions: @@ -5453,50 +5647,61 @@ Parameter Descriptions: |--|--|--| | bool | visible | control visibility of element | +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + ## ProgressBar Element Progress Bar Element - Displays a colored bar that is shaded as progress of some operation is made ``` ProgressBar(max_value, - orientation=None, - size=(None, None), - auto_size_text=None, - bar_color=None, - style=None, - border_width=None, - relief=None, - key=None, - k=None, - pad=None, - visible=True, - metadata=None) + orientation = None, + size = (None, None), + auto_size_text = None, + bar_color = None, + style = None, + border_width = None, + relief = None, + key = None, + k = None, + pad = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| int | max_value | max value of progressbar | -| str | orientation | 'horizontal' or 'vertical' | -| (int, int) | size | Size of the bar. If horizontal (chars wide, pixels high), vert (pixels wide, rows high) | -| bool | auto_size_text | Not sure why this is here | -| Tuple[str, str] or str | bar_color | The 2 colors that make up a progress bar. Easy to remember which is which if you say "ON" between colors. "red" on "green". | -| str | style | Progress bar style defined as one of these 'default', 'winnative', 'clam', 'alt', 'classic', 'vista', 'xpnative' | -| int | border_width | The amount of pixels that go around the outside of the bar | -| str | relief | relief style. Values are same as progress meter relief values. Can be a constant or a string: `RELIEF_RAISED RELIEF_SUNKEN RELIEF_FLAT RELIEF_RIDGE RELIEF_GROOVE RELIEF_SOLID` (Default value = DEFAULT_PROGRESS_BAR_RELIEF) | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| int | max_value | max value of progressbar | +| str | orientation | 'horizontal' or 'vertical' | +| (int, int) | size | Size of the bar. If horizontal (chars wide, pixels high), vert (pixels wide, rows high) | +| bool | auto_size_text | Not sure why this is here | +| Tuple[str, str] or str | bar_color | The 2 colors that make up a progress bar. Easy to remember which is which if you say "ON" between colors. "red" on "green". | +| str | style | Progress bar style defined as one of these 'default', 'winnative', 'clam', 'alt', 'classic', 'vista', 'xpnative' | +| int | border_width | The amount of pixels that go around the outside of the bar | +| str | relief | relief style. Values are same as progress meter relief values. Can be a constant or a string: `RELIEF_RAISED RELIEF_SUNKEN RELIEF_FLAT RELIEF_RIDGE RELIEF_GROOVE RELIEF_SOLID` (Default value = DEFAULT_PROGRESS_BAR_RELIEF) | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### SetFocus Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -5526,8 +5731,8 @@ Now has the ability to modify the count so that the update_bar method is not lon ``` Update(current_count, - max=None, - visible=None) + max = None, + visible = None) ``` Parameter Descriptions: @@ -5545,7 +5750,7 @@ DEPRECATED BUT STILL USABLE - has been combined with the normal ProgressBar.upda Change what the bar shows by changing the current count and optionally the max count ``` -UpdateBar(current_count, max=None) +UpdateBar(current_count, max = None) ``` Parameter Descriptions: @@ -5576,9 +5781,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -5627,7 +5832,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -5642,7 +5847,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -5695,8 +5900,8 @@ Now has the ability to modify the count so that the update_bar method is not lon ``` update(current_count, - max=None, - visible=None) + max = None, + visible = None) ``` Parameter Descriptions: @@ -5714,7 +5919,7 @@ DEPRECATED BUT STILL USABLE - has been combined with the normal ProgressBar.upda Change what the bar shows by changing the current count and optionally the max count ``` -update_bar(current_count, max=None) +update_bar(current_count, max = None) ``` Parameter Descriptions: @@ -5724,6 +5929,17 @@ Parameter Descriptions: | int | current_count | sets the current value | | int | max | changes the max value | +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + ## Radio Element Radio Button Element - Used in a group of other Radio Elements to provide user with ability to select only @@ -5732,44 +5948,44 @@ Parameter Descriptions: ``` Radio(text, group_id, - default=False, - disabled=False, - size=(None, None), - auto_size_text=None, - background_color=None, - text_color=None, - font=None, - key=None, - k=None, - pad=None, - tooltip=None, - change_submits=False, - enable_events=False, - visible=True, - metadata=None) + default = False, + disabled = False, + size = (None, None), + auto_size_text = None, + background_color = None, + text_color = None, + font = None, + key = None, + k = None, + pad = None, + tooltip = None, + change_submits = False, + enable_events = False, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | text | Text to display next to button | -| Any | group_id | Groups together multiple Radio Buttons. Any type works | -| bool | default | Set to True for the one element of the group you want initially selected | -| bool | disabled | set disable state | -| (int, int) | size | (width, height) width = characters-wide, height = rows-high | -| bool | auto_size_text | if True will size the element to match the length of the text | -| str | background_color | color of background | -| str | text_color | color of the text | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| str | tooltip | text, that will appear when mouse hovers over the element | -| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | -| bool | enable_events | Turns on the element specific events. Radio Button events happen when an item is selected | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| str | text | Text to display next to button | +| Any | group_id | Groups together multiple Radio Buttons. Any type works | +| bool | default | Set to True for the one element of the group you want initially selected | +| bool | disabled | set disable state | +| (int, int) | size | (width, height) width = characters-wide, height = rows-high | +| bool | auto_size_text | if True will size the element to match the length of the text | +| str | background_color | color of background | +| str | text_color | color of the text | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str | tooltip | text, that will appear when mouse hovers over the element | +| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | +| bool | enable_events | Turns on the element specific events. Radio Button events happen when an item is selected | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### Get @@ -5794,7 +6010,7 @@ ResetGroup() Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -5822,12 +6038,12 @@ Parameter Descriptions: Changes some of the settings for the Radio Button Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(value=None, - text=None, - background_color=None, - text_color=None, - disabled=None, - visible=None) +Update(value = None, + text = None, + background_color = None, + text_color = None, + disabled = None, + visible = None) ``` Parameter Descriptions: @@ -5862,9 +6078,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -5931,7 +6147,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -5946,7 +6162,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -5997,12 +6213,12 @@ unhide_row() Changes some of the settings for the Radio Button Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(value=None, - text=None, - background_color=None, - text_color=None, - disabled=None, - visible=None) +update(value = None, + text = None, + background_color = None, + text_color = None, + disabled = None, + visible = None) ``` Parameter Descriptions: @@ -6016,66 +6232,77 @@ Parameter Descriptions: | bool | disabled | disable or enable state of the element | | bool | visible | control visibility of element | +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + ## Slider Element A slider, horizontal or vertical ``` -Slider(range=(None, None), - default_value=None, - resolution=None, - tick_interval=None, - orientation=None, - disable_number_display=False, - border_width=None, - relief=None, - change_submits=False, - enable_events=False, - disabled=False, - size=(None, None), - font=None, - background_color=None, - text_color=None, - key=None, - k=None, - pad=None, - tooltip=None, - visible=True, - metadata=None) +Slider(range = (None, None), + default_value = None, + resolution = None, + tick_interval = None, + orientation = None, + disable_number_display = False, + border_width = None, + relief = None, + change_submits = False, + enable_events = False, + disabled = False, + size = (None, None), + font = None, + background_color = None, + text_color = None, + key = None, + k = None, + pad = None, + tooltip = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[Tuple[int, int], Tuple[float, float]] | range | slider's range (min value, max value) | -| Union[int, float] | default_value | starting value for the slider | -| Union[int, float] | resolution | the smallest amount the slider can be moved | -| Union[int, float] | tick_interval | how often a visible tick should be shown next to slider | -| str | orientation | 'horizontal' or 'vertical' ('h' or 'v' also work) | -| bool | disable_number_display | if True no number will be displayed by the Slider Element | -| int | border_width | width of border around element in pixels | -| enum | relief | relief style. RELIEF_RAISED RELIEF_SUNKEN RELIEF_FLAT RELIEF_RIDGE RELIEF_GROOVE RELIEF_SOLID | -| bool | change_submits | * DEPRICATED DO NOT USE. Use `enable_events` instead | -| bool | enable_events | If True then moving the slider will generate an Event | -| bool | disabled | set disable state for element | -| (int, int) | size | (w=characters-wide, h=rows-high) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str | background_color | color of slider's background | -| str | text_color | color of the slider's text | -| Union[str, int, tuple, object] | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| str | tooltip | text, that will appear when mouse hovers over the element | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| Tuple[int, int] or Tuple[float, float] | range | slider's range (min value, max value) | +| int or float | default_value | starting value for the slider | +| int or float | resolution | the smallest amount the slider can be moved | +| int or float | tick_interval | how often a visible tick should be shown next to slider | +| str | orientation | 'horizontal' or 'vertical' ('h' or 'v' also work) | +| bool | disable_number_display | if True no number will be displayed by the Slider Element | +| int | border_width | width of border around element in pixels | +| enum | relief | relief style. RELIEF_RAISED RELIEF_SUNKEN RELIEF_FLAT RELIEF_RIDGE RELIEF_GROOVE RELIEF_SOLID | +| bool | change_submits | * DEPRICATED DO NOT USE. Use `enable_events` instead | +| bool | enable_events | If True then moving the slider will generate an Event | +| bool | disabled | set disable state for element | +| (int, int) | size | (w=characters-wide, h=rows-high) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str | background_color | color of slider's background | +| str | text_color | color of the slider's text | +| str or int or tuple or object | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str | tooltip | text, that will appear when mouse hovers over the element | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### SetFocus Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -6103,20 +6330,20 @@ Parameter Descriptions: Changes some of the settings for the Slider Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(value=None, - range=(None, None), - disabled=None, - visible=None) +Update(value = None, + range = (None, None), + disabled = None, + visible = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[int, float] | value | sets current slider value | -| Union[Tuple[int, int], Tuple[float, float] | range | Sets a new range for slider | -| bool | disabled | disable or enable state of the element | -| bool | visible | control visibility of element | +| int or float | value | sets current slider value | +| Tuple[int, int] or Tuple[float, float | range | Sets a new range for slider | +| bool | disabled | disable or enable state of the element | +| bool | visible | control visibility of element | ### bind @@ -6139,9 +6366,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -6190,7 +6417,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -6205,7 +6432,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -6256,20 +6483,31 @@ unhide_row() Changes some of the settings for the Slider Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(value=None, - range=(None, None), - disabled=None, - visible=None) +update(value = None, + range = (None, None), + disabled = None, + visible = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[int, float] | value | sets current slider value | -| Union[Tuple[int, int], Tuple[float, float] | range | Sets a new range for slider | -| bool | disabled | disable or enable state of the element | -| bool | visible | control visibility of element | +| int or float | value | sets current slider value | +| Tuple[int, int] or Tuple[float, float | range | Sets a new range for slider | +| bool | disabled | disable or enable state of the element | +| bool | visible | control visibility of element | + +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | ## Spin Element @@ -6277,45 +6515,45 @@ Parameter Descriptions: ``` Spin(values, - initial_value=None, - disabled=False, - change_submits=False, - enable_events=False, - readonly=False, - size=(None, None), - auto_size_text=None, - font=None, - background_color=None, - text_color=None, - key=None, - k=None, - pad=None, - tooltip=None, - visible=True, - metadata=None) + initial_value = None, + disabled = False, + change_submits = False, + enable_events = False, + readonly = False, + size = (None, None), + auto_size_text = None, + font = None, + background_color = None, + text_color = None, + key = None, + k = None, + pad = None, + tooltip = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Tuple[Any] or List[Any] | values | List of valid values | -| Any | initial_value | Initial item to show in window. Choose from list of values supplied | -| bool | disabled | set disable state | -| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | -| bool | enable_events | Turns on the element specific events. Spin events happen when an item changes | -| bool | readonly | Turns on the element specific events. Spin events happen when an item changes | -| (int, int) | size | (width, height) width = characters-wide, height = rows-high | -| bool | auto_size_text | if True will size the element to match the length of the text | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str | background_color | color of background | -| str | text_color | color of the text | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| str | tooltip | text, that will appear when mouse hovers over the element | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| Tuple[Any] or List[Any] | values | List of valid values | +| Any | initial_value | Initial item to show in window. Choose from list of values supplied | +| bool | disabled | set disable state | +| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | +| bool | enable_events | Turns on the element specific events. Spin events happen when an item changes | +| bool | readonly | Turns on the element specific events. Spin events happen when an item changes | +| (int, int) | size | (width, height) width = characters-wide, height = rows-high | +| bool | auto_size_text | if True will size the element to match the length of the text | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str | background_color | color of background | +| str | text_color | color of the text | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str | tooltip | text, that will appear when mouse hovers over the element | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### Get @@ -6334,7 +6572,7 @@ item returned will be an int (not a string) Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -6365,11 +6603,11 @@ though more combinations are available. The easy way to remember is that if you change the readonly parameter then you are enabling the element. ``` -Update(value=None, - values=None, - disabled=None, - readonly=None, - visible=None) +Update(value = None, + values = None, + disabled = None, + readonly = None, + visible = None) ``` Parameter Descriptions: @@ -6403,9 +6641,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -6466,7 +6704,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -6481,7 +6719,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -6535,11 +6773,11 @@ though more combinations are available. The easy way to remember is that if you change the readonly parameter then you are enabling the element. ``` -update(value=None, - values=None, - disabled=None, - readonly=None, - visible=None) +update(value = None, + values = None, + disabled = None, + readonly = None, + visible = None) ``` Parameter Descriptions: @@ -6552,58 +6790,69 @@ Parameter Descriptions: | bool | readonly | make element readonly. Note disabled and readonly cannot be mixed. It must be one OR the other | | bool | visible | control visibility of element | +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + ## StatusBar Element A StatusBar Element creates the sunken text-filled strip at the bottom. Many Windows programs have this line ``` StatusBar(text, - size=(None, None), - auto_size_text=None, - click_submits=None, - enable_events=False, - relief="sunken", - font=None, - text_color=None, - background_color=None, - justification=None, - pad=None, - key=None, - k=None, - right_click_menu=None, - tooltip=None, - visible=True, - metadata=None) + size = (None, None), + auto_size_text = None, + click_submits = None, + enable_events = False, + relief = "sunken", + font = None, + text_color = None, + background_color = None, + justification = None, + pad = None, + key = None, + k = None, + right_click_menu = None, + tooltip = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | text | Text that is to be displayed in the widget | -| Tuple[(int), (int)] | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_text | True if size should fit the text length | -| bool | click_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | -| bool | enable_events | Turns on the element specific events. StatusBar events occur when the bar is clicked | -| enum | relief | relief style. Values are same as progress meter relief values. Can be a constant or a string: `RELIEF_RAISED RELIEF_SUNKEN RELIEF_FLAT RELIEF_RIDGE RELIEF_GROOVE RELIEF_SOLID` | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str | text_color | color of the text | -| str | background_color | color of background | -| str | justification | how string should be aligned within space provided by size. Valid choices = `left`, `right`, `center` | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| List[List[Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| str | tooltip | text, that will appear when mouse hovers over the element | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| str | text | Text that is to be displayed in the widget | +| Tuple[(int), (int)] | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_text | True if size should fit the text length | +| bool | click_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | +| bool | enable_events | Turns on the element specific events. StatusBar events occur when the bar is clicked | +| enum | relief | relief style. Values are same as progress meter relief values. Can be a constant or a string: `RELIEF_RAISED RELIEF_SUNKEN RELIEF_FLAT RELIEF_RIDGE RELIEF_GROOVE RELIEF_SOLID` | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str | text_color | color of the text | +| str | background_color | color of background | +| str | justification | how string should be aligned within space provided by size. Valid choices = `left`, `right`, `center` | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| str | tooltip | text, that will appear when mouse hovers over the element | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### SetFocus Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -6631,22 +6880,22 @@ Parameter Descriptions: Changes some of the settings for the Status Bar Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(value=None, - background_color=None, - text_color=None, - font=None, - visible=None) +Update(value = None, + background_color = None, + text_color = None, + font = None, + visible = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | value | new text to show | -| str | background_color | color of background | -| str | text_color | color of the text | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | visible | set visibility state of the element | +| str | value | new text to show | +| str | background_color | color of background | +| str | text_color | color of the text | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | visible | set visibility state of the element | ### bind @@ -6669,9 +6918,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -6720,7 +6969,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -6735,7 +6984,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -6786,238 +7035,33 @@ unhide_row() Changes some of the settings for the Status Bar Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(value=None, - background_color=None, - text_color=None, - font=None, - visible=None) +update(value = None, + background_color = None, + text_color = None, + font = None, + visible = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | value | new text to show | -| str | background_color | color of background | -| str | text_color | color of the text | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | visible | set visibility state of the element | +| str | value | new text to show | +| str | background_color | color of background | +| str | text_color | color of the text | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | visible | set visibility state of the element | -## SystemTray +### visible - A "Simulated System Tray" that duplicates the API calls available to PySimpleGUIWx and PySimpleGUIQt users. +#### property: visible - All of the functionality works. The icon is displayed ABOVE the system tray rather than inside of it. - -SystemTray - create an icon in the system tray - -``` -SystemTray(menu=None, - filename=None, - data=None, - data_base64=None, - tooltip=None, - metadata=None) -``` - -Parameter Descriptions: +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method |Type|Name|Meaning| -|--|--|--| -| List[List[List[str] or str]] | menu | Menu definition. Example - ['UNUSED', ['My', 'Simple', '---', 'Menu', 'Exit']] | -| str | filename | filename for icon | -| bytes | data | in-ram image for icon (same as data_base64 parm) | -| bytes | data_base64 | base-64 data for icon | -| str | tooltip | tooltip string | -| Any | metadata | User metadata that can be set to ANYTHING | - -### Close - -Close the system tray window - -```python -Close() -``` - -### Hide - -Hides the icon - -```python -Hide() -``` - -### Read - -Reads the context menu - -``` -Read(timeout=None) -``` - -### ShowMessage - -Shows a balloon above icon in system tray - -``` -ShowMessage(title, - message, - filename=None, - data=None, - data_base64=None, - messageicon=None, - time=(1000, 3000)) -``` - -Parameter Descriptions: - -|Type|Name|Meaning| -|--|--|--| -| | title | Title shown in balloon | -| | message | Message to be displayed | -| | filename | Optional icon filename | -| | data | Optional in-ram icon | -| | data_base64 | Optional base64 icon | -| Union[int, Tuple[int, int]] | time | Amount of time to display message in milliseconds. If tuple, first item is fade in/out duration | -| (Any) | **RETURN** | The event that happened during the display such as user clicked on message - -### UnHide - -Restores a previously hidden icon - -```python -UnHide() -``` - -### Update - -Updates the menu, tooltip or icon - -``` -Update(menu=None, - tooltip=None, - filename=None, - data=None, - data_base64=None) -``` - -Parameter Descriptions: - -|Type|Name|Meaning| -|--|--|--| -| ??? | menu | menu defintion | -| ??? | tooltip | string representing tooltip | -| ??? | filename | icon filename | -| ??? | data | icon raw image | -| ??? | data_base64 | icon base 64 image | - -### close - -Close the system tray window - -```python -close() -``` - -### hide - -Hides the icon - -```python -hide() -``` - -### notify - -Displays a "notification window", usually in the bottom right corner of your display. Has an icon, a title, and a message -The window will slowly fade in and out if desired. Clicking on the window will cause it to move through the end the current "phase". For example, if the window was fading in and it was clicked, then it would immediately stop fading in and instead be fully visible. It's a way for the user to quickly dismiss the window. - -``` -notify(title, - message, - icon=..., - display_duration_in_ms=3000, - fade_in_duration=1000, - alpha=0.9, - location=None) -``` - -Parameter Descriptions: - -|Type|Name|Meaning| -|--|--|--| -| str | title | Text to be shown at the top of the window in a larger font | -| str | message | Text message that makes up the majority of the window | -| Union[bytes, str] | icon | A base64 encoded PNG/GIF image or PNG/GIF filename that will be displayed in the window | -| int | display_duration_in_ms | Number of milliseconds to show the window | -| int | fade_in_duration | Number of milliseconds to fade window in and out | -| float | alpha | Alpha channel. 0 - invisible 1 - fully visible | -| Tuple[int, int] | location | Location on the screen to display the window | -| (int) | **RETURN** | (int) reason for returning - -### read - -Reads the context menu - -``` -read(timeout=None) -``` - -### show_message - -Shows a balloon above icon in system tray - -``` -show_message(title, - message, - filename=None, - data=None, - data_base64=None, - messageicon=None, - time=(1000, 3000)) -``` - -Parameter Descriptions: - -|Type|Name|Meaning| -|--|--|--| -| | title | Title shown in balloon | -| | message | Message to be displayed | -| | filename | Optional icon filename | -| | data | Optional in-ram icon | -| | data_base64 | Optional base64 icon | -| Union[int, Tuple[int, int]] | time | Amount of time to display message in milliseconds. If tuple, first item is fade in/out duration | -| (Any) | **RETURN** | The event that happened during the display such as user clicked on message - -### un_hide - -Restores a previously hidden icon - -```python -un_hide() -``` - -### update - -Updates the menu, tooltip or icon - -``` -update(menu=None, - tooltip=None, - filename=None, - data=None, - data_base64=None) -``` - -Parameter Descriptions: - -|Type|Name|Meaning| -|--|--|--| -| ??? | menu | menu defintion | -| ??? | tooltip | string representing tooltip | -| ??? | filename | icon filename | -| ??? | data | icon raw image | -| ??? | data_base64 | icon base 64 image | +|---|---|---| +| bool | **return** | Visibility state for element | ## Tab Element @@ -7027,40 +7071,40 @@ Parameter Descriptions: ``` Tab(title, layout, - title_color=None, - background_color=None, - font=None, - pad=None, - disabled=False, - border_width=None, - key=None, - k=None, - tooltip=None, - right_click_menu=None, - visible=True, - element_justification="left", - metadata=None) + title_color = None, + background_color = None, + font = None, + pad = None, + disabled = False, + border_width = None, + key = None, + k = None, + tooltip = None, + right_click_menu = None, + visible = True, + element_justification = "left", + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | title | text to show on the tab | -| List[List[Element]] | layout | The element layout that will be shown in the tab | -| str | title_color | color of the tab text (note not currently working on tkinter) | -| str | background_color | color of background of the entire layout | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| bool | disabled | If True button will be created disabled | -| int | border_width | width of border around element in pixels | -| Union[str, int, tuple, object] | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| str | tooltip | text, that will appear when mouse hovers over the element | -| List[List[Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| bool | visible | set visibility state of the element | -| str | element_justification | All elements inside the Tab will have this justification 'left', 'right', 'center' are valid values | -| Any | metadata | User metadata that can be set to ANYTHING | +| str | title | text to show on the tab | +| List[List[Element]] | layout | The element layout that will be shown in the tab | +| str | title_color | color of the tab text (note not currently working on tkinter) | +| str | background_color | color of background of the entire layout | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| bool | disabled | If True button will be created disabled | +| int | border_width | width of border around element in pixels | +| str or int or tuple or object | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | tooltip | text, that will appear when mouse hovers over the element | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| bool | visible | set visibility state of the element | +| str | element_justification | All elements inside the Tab will have this justification 'left', 'right', 'center' are valid values | +| Any | metadata | User metadata that can be set to ANYTHING | ### AddRow @@ -7103,7 +7147,7 @@ Select() Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -7131,9 +7175,9 @@ Parameter Descriptions: Changes some of the settings for the Tab Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(title=None, - disabled=None, - visible=None) +Update(title = None, + disabled = None, + visible = None) ``` Parameter Descriptions: @@ -7179,9 +7223,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -7252,7 +7296,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -7267,7 +7311,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -7318,9 +7362,9 @@ unhide_row() Changes some of the settings for the Tab Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(title=None, - disabled=None, - visible=None) +update(title = None, + disabled = None, + visible = None) ``` Parameter Descriptions: @@ -7331,53 +7375,64 @@ Parameter Descriptions: | bool | disabled | disable or enable state of the element | | bool | visible | control visibility of element | +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + ## TabGroup Element TabGroup Element groups together your tabs into the group of tabs you see displayed in your window ``` TabGroup(layout, - tab_location=None, - title_color=None, - tab_background_color=None, - selected_title_color=None, - selected_background_color=None, - background_color=None, - font=None, - change_submits=False, - enable_events=False, - pad=None, - border_width=None, - theme=None, - key=None, - k=None, - tooltip=None, - visible=True, - metadata=None) + tab_location = None, + title_color = None, + tab_background_color = None, + selected_title_color = None, + selected_background_color = None, + background_color = None, + font = None, + change_submits = False, + enable_events = False, + pad = None, + border_width = None, + theme = None, + key = None, + k = None, + tooltip = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| List[List[Tab]] | layout | Layout of Tabs. Different than normal layouts. ALL Tabs should be on first row | -| str | tab_location | location that tabs will be displayed. Choices are left, right, top, bottom, lefttop, leftbottom, righttop, rightbottom, bottomleft, bottomright, topleft, topright | -| str | title_color | color of text on tabs | -| str | tab_background_color | color of all tabs that are not selected | -| str | selected_title_color | color of tab text when it is selected | -| str | selected_background_color | color of tab when it is selected | -| str | background_color | color of background area that tabs are located on | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | change_submits | * DEPRICATED DO NOT USE. Use `enable_events` instead | -| bool | enable_events | If True then switching tabs will generate an Event | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| int | border_width | width of border around element in pixels | -| enum | theme | DEPRICATED - You can only specify themes using set options or when window is created. It's not possible to do it on an element basis | -| Union[str, int, tuple, object] | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| str | tooltip | text, that will appear when mouse hovers over the element | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| List[List[Tab]] | layout | Layout of Tabs. Different than normal layouts. ALL Tabs should be on first row | +| str | tab_location | location that tabs will be displayed. Choices are left, right, top, bottom, lefttop, leftbottom, righttop, rightbottom, bottomleft, bottomright, topleft, topright | +| str | title_color | color of text on tabs | +| str | tab_background_color | color of all tabs that are not selected | +| str | selected_title_color | color of tab text when it is selected | +| str | selected_background_color | color of tab when it is selected | +| str | background_color | color of background area that tabs are located on | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | change_submits | * DEPRICATED DO NOT USE. Use `enable_events` instead | +| bool | enable_events | If True then switching tabs will generate an Event | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| int | border_width | width of border around element in pixels | +| enum | theme | DEPRICATED - You can only specify themes using set options or when window is created. It's not possible to do it on an element basis | +| str or int or tuple or object | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | tooltip | text, that will appear when mouse hovers over the element | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### FindKeyFromTabName @@ -7392,7 +7447,7 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tab_name | name of a tab | -| Union[key, None] | **RETURN** | Returns the key or None if no key found +| key or None | **RETURN** | Returns the key or None if no key found ### Get @@ -7412,7 +7467,7 @@ are using this method correctly? Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -7456,9 +7511,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -7482,7 +7537,7 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| | str | tab_name | name of a tab | -| Union[key, None] | **RETURN** | Returns the key or None if no key found +| key or None | **RETURN** | Returns the key or None if no key found ### get @@ -7535,7 +7590,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -7550,7 +7605,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -7610,83 +7665,94 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + ## Table Element ``` Table(values, - headings=None, - visible_column_map=None, - col_widths=None, - def_col_width=10, - auto_size_columns=True, - max_col_width=20, - select_mode=None, - display_row_numbers=False, - num_rows=None, - row_height=None, - font=None, - justification="right", - text_color=None, - background_color=None, - alternating_row_color=None, - selected_row_colors=(None, None), - header_text_color=None, - header_background_color=None, - header_font=None, - row_colors=None, - vertical_scroll_only=True, - hide_vertical_scroll=False, - size=(None, None), - change_submits=False, - enable_events=False, - bind_return_key=False, - pad=None, - key=None, - k=None, - tooltip=None, - right_click_menu=None, - visible=True, - metadata=None) + headings = None, + visible_column_map = None, + col_widths = None, + def_col_width = 10, + auto_size_columns = True, + max_col_width = 20, + select_mode = None, + display_row_numbers = False, + num_rows = None, + row_height = None, + font = None, + justification = "right", + text_color = None, + background_color = None, + alternating_row_color = None, + selected_row_colors = (None, None), + header_text_color = None, + header_background_color = None, + header_font = None, + row_colors = None, + vertical_scroll_only = True, + hide_vertical_scroll = False, + size = (None, None), + change_submits = False, + enable_events = False, + bind_return_key = False, + pad = None, + key = None, + k = None, + tooltip = None, + right_click_menu = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| List[List[Union[str, int, float]]] | values | ??? | -| List[str] | headings | The headings to show on the top line | -| List[bool] | visible_column_map | One entry for each column. False indicates the column is not shown | -| List[int] | col_widths | Number of characters that each column will occupy | -| int | def_col_width | Default column width in characters | -| bool | auto_size_columns | if True columns will be sized automatically | -| int | max_col_width | Maximum width for all columns in characters | -| enum | select_mode | Select Mode. Valid values start with "TABLE_SELECT_MODE_". Valid values are: TABLE_SELECT_MODE_NONE TABLE_SELECT_MODE_BROWSE TABLE_SELECT_MODE_EXTENDED | -| bool | display_row_numbers | if True, the first column of the table will be the row # | -| int | num_rows | The number of rows of the table to display at a time | -| int | row_height | height of a single row in pixels | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str | justification | 'left', 'right', 'center' are valid choices | -| str | text_color | color of the text | -| str | background_color | color of background | -| str | alternating_row_color | if set then every other row will have this color in the background. | -| str or Tuple[str, str] | selected_row_colors | Sets the text color and background color for a selected row. Same format as button colors - tuple ('red', 'yellow') or string 'red on yellow'. Defaults to theme's button color | -| str | header_text_color | sets the text color for the header | -| str | header_background_color | sets the background color for the header | -| Union[str, Tuple[str, int]] | header_font | specifies the font family, size, etc | -| List[Union[Tuple[int, str], Tuple[Int, str, str]] | row_colors | list of tuples of (row, background color) OR (row, foreground color, background color). Sets the colors of listed rows to the color(s) provided (note the optional foreground color) | -| bool | vertical_scroll_only | if True only the vertical scrollbar will be visible | -| bool | hide_vertical_scroll | if True vertical scrollbar will be hidden | -| (int, int) | size | DO NOT USE! Use num_rows instead | -| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | -| bool | enable_events | Turns on the element specific events. Table events happen when row is clicked | -| bool | bind_return_key | if True, pressing return key will cause event coming from Table, ALSO a left button double click will generate an event if this parameter is True | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| str | tooltip | text, that will appear when mouse hovers over the element | -| List[List[Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| List[List[str or int or float]] | values | ??? | +| List[str] | headings | The headings to show on the top line | +| List[bool] | visible_column_map | One entry for each column. False indicates the column is not shown | +| List[int] | col_widths | Number of characters that each column will occupy | +| int | def_col_width | Default column width in characters | +| bool | auto_size_columns | if True columns will be sized automatically | +| int | max_col_width | Maximum width for all columns in characters | +| enum | select_mode | Select Mode. Valid values start with "TABLE_SELECT_MODE_". Valid values are: TABLE_SELECT_MODE_NONE TABLE_SELECT_MODE_BROWSE TABLE_SELECT_MODE_EXTENDED | +| bool | display_row_numbers | if True, the first column of the table will be the row # | +| int | num_rows | The number of rows of the table to display at a time | +| int | row_height | height of a single row in pixels | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str | justification | 'left', 'right', 'center' are valid choices | +| str | text_color | color of the text | +| str | background_color | color of background | +| str | alternating_row_color | if set then every other row will have this color in the background. | +| str or Tuple[str, str] | selected_row_colors | Sets the text color and background color for a selected row. Same format as button colors - tuple ('red', 'yellow') or string 'red on yellow'. Defaults to theme's button color | +| str | header_text_color | sets the text color for the header | +| str | header_background_color | sets the background color for the header | +| str or Tuple[str, int] | header_font | specifies the font family, size, etc | +| List[Tuple[int, str] or Tuple[Int, str, str]] | row_colors | list of tuples of (row, background color) OR (row, foreground color, background color). Sets the colors of listed rows to the color(s) provided (note the optional foreground color) | +| bool | vertical_scroll_only | if True only the vertical scrollbar will be visible | +| bool | hide_vertical_scroll | if True vertical scrollbar will be hidden | +| (int, int) | size | DO NOT USE! Use num_rows instead | +| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | +| bool | enable_events | Turns on the element specific events. Table events happen when row is clicked | +| bool | bind_return_key | if True, pressing return key will cause event coming from Table, ALSO a left button double click will generate an event if this parameter is True | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | tooltip | text, that will appear when mouse hovers over the element | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### Get @@ -7705,7 +7771,7 @@ user when Table was created or Updated. Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -7733,24 +7799,24 @@ Parameter Descriptions: Changes some of the settings for the Table Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(values=None, - num_rows=None, - visible=None, - select_rows=None, - alternating_row_color=None, - row_colors=None) +Update(values = None, + num_rows = None, + visible = None, + select_rows = None, + alternating_row_color = None, + row_colors = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| List[List[Union[str, int, float]]] | values | A new 2-dimensional table to show | -| int | num_rows | How many rows to display at a time | -| bool | visible | if True then will be visible | -| List[int] | select_rows | List of rows to select as if user did | -| str | alternating_row_color | the color to make every other row | -| List[Union[Tuple[int, str], Tuple[Int, str, str]] | row_colors | list of tuples of (row, background color) OR (row, foreground color, background color). Changes the colors of listed rows to the color(s) provided (note the optional foreground color) | +| List[List[str or int or float]] | values | A new 2-dimensional table to show | +| int | num_rows | How many rows to display at a time | +| bool | visible | if True then will be visible | +| List[int] | select_rows | List of rows to select as if user did | +| str | alternating_row_color | the color to make every other row | +| List[Tuple[int, str] or Tuple[Int, str, str]] | row_colors | list of tuples of (row, background color) OR (row, foreground color, background color). Changes the colors of listed rows to the color(s) provided (note the optional foreground color) | ### bind @@ -7773,9 +7839,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -7836,7 +7902,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -7851,7 +7917,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -7902,74 +7968,85 @@ unhide_row() Changes some of the settings for the Table Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(values=None, - num_rows=None, - visible=None, - select_rows=None, - alternating_row_color=None, - row_colors=None) +update(values = None, + num_rows = None, + visible = None, + select_rows = None, + alternating_row_color = None, + row_colors = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| List[List[Union[str, int, float]]] | values | A new 2-dimensional table to show | -| int | num_rows | How many rows to display at a time | -| bool | visible | if True then will be visible | -| List[int] | select_rows | List of rows to select as if user did | -| str | alternating_row_color | the color to make every other row | -| List[Union[Tuple[int, str], Tuple[Int, str, str]] | row_colors | list of tuples of (row, background color) OR (row, foreground color, background color). Changes the colors of listed rows to the color(s) provided (note the optional foreground color) | +| List[List[str or int or float]] | values | A new 2-dimensional table to show | +| int | num_rows | How many rows to display at a time | +| bool | visible | if True then will be visible | +| List[int] | select_rows | List of rows to select as if user did | +| str | alternating_row_color | the color to make every other row | +| List[Tuple[int, str] or Tuple[Int, str, str]] | row_colors | list of tuples of (row, background color) OR (row, foreground color, background color). Changes the colors of listed rows to the color(s) provided (note the optional foreground color) | + +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | ## Text Element Text - Display some text in the window. Usually this means a single line of text. However, the text can also be multiple lines. If multi-lined there are no scroll bars. ``` -Text(text="", - size=(None, None), - auto_size_text=None, - click_submits=False, - enable_events=False, - relief=None, - font=None, - text_color=None, - background_color=None, - border_width=None, - justification=None, - pad=None, - key=None, - k=None, - right_click_menu=None, - grab=None, - tooltip=None, - visible=True, - metadata=None) +Text(text = "", + size = (None, None), + auto_size_text = None, + click_submits = False, + enable_events = False, + relief = None, + font = None, + text_color = None, + background_color = None, + border_width = None, + justification = None, + pad = None, + key = None, + k = None, + right_click_menu = None, + grab = None, + tooltip = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | text | The text to display. Can include /n to achieve multiple lines. Will convert (optional) parameter into a string | -| (int, int) | size | (width, height) width = characters-wide, height = rows-high | -| bool | auto_size_text | if True size of the Text Element will be sized to fit the string provided in 'text' parm | -| bool | click_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | -| bool | enable_events | Turns on the element specific events. Text events happen when the text is clicked | -| (str/enum) | relief | relief style around the text. Values are same as progress meter relief values. Should be a constant that is defined at starting with "RELIEF_" - `RELIEF_RAISED, RELIEF_SUNKEN, RELIEF_FLAT, RELIEF_RIDGE, RELIEF_GROOVE, RELIEF_SOLID` | -| (str or Tuple[str, int] or None) | font | specifies the font family, size, etc | -| str | text_color | color of the text | -| str | background_color | color of background | -| int | border_width | number of pixels for the border (if using a relief) | -| str | justification | how string should be aligned within space provided by size. Valid choices = `left`, `right`, `center` | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| List[List[Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| bool | grab | If True can grab this element and move the window around. Default is False | -| str | tooltip | text, that will appear when mouse hovers over the element | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| Any | text | The text to display. Can include /n to achieve multiple lines. Will convert (optional) parameter into a string | +| (int, int or None) | size | (width, height) width = characters-wide, height = rows-high | +| bool | auto_size_text | if True size of the Text Element will be sized to fit the string provided in 'text' parm | +| bool | click_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | +| bool | enable_events | Turns on the element specific events. Text events happen when the text is clicked | +| (str/enum) | relief | relief style around the text. Values are same as progress meter relief values. Should be a constant that is defined at starting with "RELIEF_" - `RELIEF_RAISED, RELIEF_SUNKEN, RELIEF_FLAT, RELIEF_RIDGE, RELIEF_GROOVE, RELIEF_SOLID` | +| (str or Tuple[str, int] or None) | font | specifies the font family, size, etc | +| str | text_color | color of the text | +| str | background_color | color of background | +| int | border_width | number of pixels for the border (if using a relief) | +| str | justification | how string should be aligned within space provided by size. Valid choices = `left`, `right`, `center` | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| bool | grab | If True can grab this element and move the window around. Default is False | +| str | tooltip | text, that will appear when mouse hovers over the element | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | #### Get @@ -7986,7 +8063,7 @@ Gets the current value of the displayed text Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -8014,22 +8091,22 @@ Parameter Descriptions: Changes some of the settings for the Text Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(value=None, - background_color=None, - text_color=None, - font=None, - visible=None) +Update(value = None, + background_color = None, + text_color = None, + font = None, + visible = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | value | new text to show | -| str | background_color | color of background | -| str | text_color | color of the text | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | visible | set visibility state of the element | +| str | value | new text to show | +| str | background_color | color of background | +| str | text_color | color of the text | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | visible | set visibility state of the element | ### bind @@ -8052,9 +8129,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -8113,7 +8190,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -8128,7 +8205,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -8179,22 +8256,82 @@ unhide_row() Changes some of the settings for the Text Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(value=None, - background_color=None, - text_color=None, - font=None, - visible=None) +update(value = None, + background_color = None, + text_color = None, + font = None, + visible = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | value | new text to show | -| str | background_color | color of background | -| str | text_color | color of the text | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | visible | set visibility state of the element | +| str | value | new text to show | +| str | background_color | color of background | +| str | text_color | color of the text | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | visible | set visibility state of the element | + +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + +## Titlebar Element + +Note that while the Titlebar is an element, it is implemented using a function. +It is actually a "compound element" that consists of several elements combined into a single Column element. +See the Column element to get a list of method calls available. The function returns a Column element. + +A custom titlebar that replaces the OS provided titlebar, thus giving you control +the is not possible using the OS provided titlebar such as the color. + +NOTE LINUX USERS - at the moment the minimize function is not yet working. Windows users +should have no problem and it should function as a normal window would. + +This titlebar is created from a row of elements that is then encapulated into a +single Column element which is what the Titlebar returns to you. + +A custom titlebar removes the margins from your window. Ify ou want the remainder +of your Window to have margins, place the layout after the Titlebar into a Column and +set the pad of that Column to the dimensions you would like your margins to have. + +The Titlebar is a COLUMN element. You can thus call the update method for the column and +perform operations such as making the column visible/invisible + +``` +Titlebar(title = "", + icon = None, + text_color = None, + background_color = None, + font = None, + key = None, + k = None) +``` + +Parameter Descriptions: + +|Type|Name|Meaning| +|--|--|--| +| str or bytes or None | icon | Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | +| str | title | The "title" to show in the titlebar | +| str or None | text_color | Text color for titlebar | +| str or None | background_color | Background color for titlebar | +| str or None | font | Font to be used for the text and the symbols | +| str or int or tuple or object or None | key | Identifies an Element. Should be UNIQUE to this window. | +| str or int or tuple or object or None | k | Exactly the same as key. Choose one of them to use | +| List[Element] | **RETURN** | A list of elements (i.e. a "row" for a layout) + :param key: Identifies an Element. Should be UNIQUE to this window. + :type key: str | int | tuple | object | None + :param k: Exactly the same as key. Choose one of them to use + :type k: str | int | tuple | object | None ## Tree Element @@ -8202,77 +8339,77 @@ Parameter Descriptions: to hold the user's data and pass to the element for display. ``` -Tree(data=None, - headings=None, - visible_column_map=None, - col_widths=None, - col0_width=10, - def_col_width=10, - auto_size_columns=True, - max_col_width=20, - select_mode=None, - show_expanded=False, - change_submits=False, - enable_events=False, - font=None, - justification="right", - text_color=None, - background_color=None, - selected_row_colors=(None, None), - header_text_color=None, - header_background_color=None, - header_font=None, - num_rows=None, - row_height=None, - pad=None, - key=None, - k=None, - tooltip=None, - right_click_menu=None, - visible=True, - metadata=None) +Tree(data = None, + headings = None, + visible_column_map = None, + col_widths = None, + col0_width = 10, + def_col_width = 10, + auto_size_columns = True, + max_col_width = 20, + select_mode = None, + show_expanded = False, + change_submits = False, + enable_events = False, + font = None, + justification = "right", + text_color = None, + background_color = None, + selected_row_colors = (None, None), + header_text_color = None, + header_background_color = None, + header_font = None, + num_rows = None, + row_height = None, + pad = None, + key = None, + k = None, + tooltip = None, + right_click_menu = None, + visible = True, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| TreeData | data | The data represented using a PySimpleGUI provided TreeData class | -| List[str] | headings | List of individual headings for each column | -| List[bool] | visible_column_map | Determines if a column should be visible. If left empty, all columns will be shown | -| List[int] | col_widths | List of column widths so that individual column widths can be controlled | -| int | col0_width | Size of Column 0 which is where the row numbers will be optionally shown | -| int | def_col_width | default column width | -| bool | auto_size_columns | if True, the size of a column is determined using the contents of the column | -| int | max_col_width | the maximum size a column can be | -| enum | select_mode | Use same values as found on Table Element. Valid values include: TABLE_SELECT_MODE_NONE TABLE_SELECT_MODE_BROWSE TABLE_SELECT_MODE_EXTENDED | -| bool | show_expanded | if True then the tree will be initially shown with all nodes completely expanded | -| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | -| bool | enable_events | Turns on the element specific events. Tree events happen when row is clicked | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str | justification | 'left', 'right', 'center' are valid choices | -| str | text_color | color of the text | -| str | background_color | color of background | -| str or Tuple[str, str] | selected_row_colors | Sets the text color and background color for a selected row. Same format as button colors - tuple ('red', 'yellow') or string 'red on yellow'. Defaults to theme's button color | -| str | header_text_color | sets the text color for the header | -| str | header_background_color | sets the background color for the header | -| Union[str, Tuple[str, int]] | header_font | specifies the font family, size, etc | -| int | num_rows | The number of rows of the table to display at a time | -| int | row_height | height of a single row in pixels | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| str | tooltip | text, that will appear when mouse hovers over the element | -| [Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | -| bool | visible | set visibility state of the element | -| Any | metadata | User metadata that can be set to ANYTHING | +| TreeData | data | The data represented using a PySimpleGUI provided TreeData class | +| List[str] | headings | List of individual headings for each column | +| List[bool] | visible_column_map | Determines if a column should be visible. If left empty, all columns will be shown | +| List[int] | col_widths | List of column widths so that individual column widths can be controlled | +| int | col0_width | Size of Column 0 which is where the row numbers will be optionally shown | +| int | def_col_width | default column width | +| bool | auto_size_columns | if True, the size of a column is determined using the contents of the column | +| int | max_col_width | the maximum size a column can be | +| enum | select_mode | Use same values as found on Table Element. Valid values include: TABLE_SELECT_MODE_NONE TABLE_SELECT_MODE_BROWSE TABLE_SELECT_MODE_EXTENDED | +| bool | show_expanded | if True then the tree will be initially shown with all nodes completely expanded | +| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | +| bool | enable_events | Turns on the element specific events. Tree events happen when row is clicked | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str | justification | 'left', 'right', 'center' are valid choices | +| str | text_color | color of the text | +| str | background_color | color of background | +| str or Tuple[str, str] | selected_row_colors | Sets the text color and background color for a selected row. Same format as button colors - tuple ('red', 'yellow') or string 'red on yellow'. Defaults to theme's button color | +| str | header_text_color | sets the text color for the header | +| str | header_background_color | sets the background color for the header | +| str or Tuple[str, int] | header_font | specifies the font family, size, etc | +| int | num_rows | The number of rows of the table to display at a time | +| int | row_height | height of a single row in pixels | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | tooltip | text, that will appear when mouse hovers over the element | +| List[List[str] or str]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| bool | visible | set visibility state of the element | +| Any | metadata | User metadata that can be set to ANYTHING | ### SetFocus Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -8300,24 +8437,24 @@ Parameter Descriptions: Changes some of the settings for the Tree Element. Must call `Window.Read` or `Window.Finalize` prior ``` -Update(values=None, - key=None, - value=None, - text=None, - icon=None, - visible=None) +Update(values = None, + key = None, + value = None, + text = None, + icon = None, + visible = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| TreeData | values | Representation of the tree | -| Union[str, int, tuple, object] | key | identifies a particular item in tree to update | -| Any | value | sets the node identified by key to a particular value | -| str | text | sets the node identified by ket to this string | -| Union[bytes, str] | icon | can be either a base64 icon or a filename for the icon | -| bool | visible | control visibility of element | +| TreeData | values | Representation of the tree | +| str or int or tuple or object | key | identifies a particular item in tree to update | +| Any | value | sets the node identified by key to a particular value | +| str | text | sets the node identified by ket to this string | +| bytes or str | icon | can be either a base64 icon or a filename for the icon | +| bool | visible | control visibility of element | ### add_treeview_data @@ -8354,9 +8491,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -8405,7 +8542,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -8420,7 +8557,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -8485,24 +8622,35 @@ unhide_row() Changes some of the settings for the Tree Element. Must call `Window.Read` or `Window.Finalize` prior ``` -update(values=None, - key=None, - value=None, - text=None, - icon=None, - visible=None) +update(values = None, + key = None, + value = None, + text = None, + icon = None, + visible = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| TreeData | values | Representation of the tree | -| Union[str, int, tuple, object] | key | identifies a particular item in tree to update | -| Any | value | sets the node identified by key to a particular value | -| str | text | sets the node identified by ket to this string | -| Union[bytes, str] | icon | can be either a base64 icon or a filename for the icon | -| bool | visible | control visibility of element | +| TreeData | values | Representation of the tree | +| str or int or tuple or object | key | identifies a particular item in tree to update | +| Any | value | sets the node identified by key to a particular value | +| str | text | sets the node identified by ket to this string | +| bytes or str | icon | can be either a base64 icon or a filename for the icon | +| bool | visible | control visibility of element | + +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | ## TreeData (for Tree Element) @@ -8526,18 +8674,18 @@ Insert(parent, key, text, values, - icon=None) + icon = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Node | parent | the parent Node | -| Union[str, int, tuple, object] | key | Used to uniquely identify this node | -| str | text | The text that is displayed at this node's location | -| List[Any] | values | The list of values that are displayed at this node | -| Union[str, bytes] | icon | icon | +| Node | parent | the parent Node | +| str or int or tuple or object | key | Used to uniquely identify this node | +| str | text | The text that is displayed at this node's location | +| List[Any] | values | The list of values that are displayed at this node | +| str or bytes | icon | icon | ### Node @@ -8548,7 +8696,7 @@ Node(parent, key, text, values, - icon=None) + icon = None) ``` ### insert @@ -8561,18 +8709,18 @@ insert(parent, key, text, values, - icon=None) + icon = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Node | parent | the parent Node | -| Union[str, int, tuple, object] | key | Used to uniquely identify this node | -| str | text | The text that is displayed at this node's location | -| List[Any] | values | The list of values that are displayed at this node | -| Union[str, bytes] | icon | icon | +| Node | parent | the parent Node | +| str or int or tuple or object | key | Used to uniquely identify this node | +| str | text | The text that is displayed at this node's location | +| List[Any] | values | The list of values that are displayed at this node | +| str or bytes | icon | icon | ## VerticalSeparator Element @@ -8580,27 +8728,27 @@ Parameter Descriptions: Column Element if extra height is needed ``` -VerticalSeparator(color=None, - pad=None, - key=None, - k=None) +VerticalSeparator(color = None, + pad = None, + key = None, + k = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | color | Color of the line. Defaults to theme's text color. Can be name or #RRGGBB format | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | -| Union[str, int, tuple, object] | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | color | Color of the line. Defaults to theme's text color. Can be name or #RRGGBB format | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) | +| str or int or tuple or object | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | ### SetFocus Sets the current focus to be on this element ``` -SetFocus(force=False) +SetFocus(force = False) ``` Parameter Descriptions: @@ -8644,9 +8792,9 @@ Parameter Descriptions: Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions ``` -expand(expand_x=False, - expand_y=False, - expand_row=True) +expand(expand_x = False, + expand_y = False, + expand_row = True) ``` Parameter Descriptions: @@ -8695,7 +8843,7 @@ Parameter Descriptions: Sets the current focus to be on this element ``` -set_focus(force=False) +set_focus(force = False) ``` Parameter Descriptions: @@ -8710,7 +8858,7 @@ Changes the size of an element to a specific size. It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed. ``` -set_size(size=(None, None)) +set_size(size = (None, None)) ``` Parameter Descriptions: @@ -8756,14 +8904,25 @@ Unhides (makes visible again) the row container that the Element is located on. unhide_row() ``` +### visible + +#### property: visible + +Returns visibility state for the element. This is a READONLY property +To control visibility, use the element's update method + +|Type|Name|Meaning| +|---|---|---| +| bool | **return** | Visibility state for element | + ## UserSettings (Class interface to User Settings APIs... can also use the function call interface) User Settings ``` -UserSettings(filename=None, - path=None, - silent_on_error=False) +UserSettings(filename = None, + path = None, + silent_on_error = False) ``` Parameter Descriptions: @@ -8798,7 +8957,7 @@ If you don't choose a filename, your application's filename + '.json' will be us Also sets your current dictionary to a blank one. ``` -delete_file(filename=None, path=None) +delete_file(filename = None, path = None) ``` Parameter Descriptions: @@ -8813,7 +8972,7 @@ Parameter Descriptions: Check if a particular settings file exists. Returns True if file exists ``` -exists(filename=None, path=None) +exists(filename = None, path = None) ``` Parameter Descriptions: @@ -8831,7 +8990,7 @@ the "default value" is returned. This default can be specified in this call, or by calling set_default. If nothing specified now or previously, then None is returned as default. ``` -get(key, default=None) +get(key, default = None) ``` Parameter Descriptions: @@ -8868,7 +9027,7 @@ Normally the filename and path are split in the user_settings calls. However for can be combined so that the filename contains both the path and filename. ``` -get_filename(filename=None, path=None) +get_filename(filename = None, path = None) ``` Parameter Descriptions: @@ -8886,7 +9045,7 @@ The filename can be a full filename including a path, or the path can be specifi If no filename is specified, then the caller's filename will be used with the extension ".json" ``` -load(filename=None, path=None) +load(filename = None, path = None) ``` Parameter Descriptions: @@ -8913,7 +9072,7 @@ Saves the current settings dictionary. If a filename or path is specified in th previously specitfied filename to create a new settings file. The settings dictionary is then saved to the newly defined file. ``` -save(filename=None, path=None) +save(filename = None, path = None) ``` Parameter Descriptions: @@ -8960,7 +9119,7 @@ Parameter Descriptions: Sets the location of the settings file ``` -set_location(filename=None, path=None) +set_location(filename = None, path = None) ``` Parameter Descriptions: @@ -8990,47 +9149,53 @@ Parameter Descriptions: ``` Window(title, - layout=None, - default_element_size=(45, 1), - default_button_element_size=(None, None), - auto_size_text=None, - auto_size_buttons=None, - location=(None, None), - size=(None, None), - element_padding=None, - margins=(None, None), - button_color=None, - font=None, - progress_bar_color=(None, None), - background_color=None, - border_depth=None, - auto_close=False, - auto_close_duration=3, - icon=None, - force_toplevel=False, - alpha_channel=1, - return_keyboard_events=False, - use_default_focus=True, - text_justification=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - resizable=False, - disable_close=False, - disable_minimize=False, - right_click_menu=None, - transparent_color=None, - debugger_enabled=True, - right_click_menu_background_color=None, - right_click_menu_text_color=None, - right_click_menu_disabled_text_color=None, - right_click_menu_font=None, - finalize=False, - element_justification="left", - ttk_theme=None, - use_ttk_buttons=None, - modal=False, - metadata=None) + layout = None, + default_element_size = (45, 1), + default_button_element_size = (None, None), + auto_size_text = None, + auto_size_buttons = None, + location = (None, None), + size = (None, None), + element_padding = None, + margins = (None, None), + button_color = None, + font = None, + progress_bar_color = (None, None), + background_color = None, + border_depth = None, + auto_close = False, + auto_close_duration = 3, + icon = None, + force_toplevel = False, + alpha_channel = 1, + return_keyboard_events = False, + use_default_focus = True, + text_justification = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + resizable = False, + disable_close = False, + disable_minimize = False, + right_click_menu = None, + transparent_color = None, + debugger_enabled = True, + right_click_menu_background_color = None, + right_click_menu_text_color = None, + right_click_menu_disabled_text_color = None, + right_click_menu_font = None, + finalize = False, + element_justification = "left", + ttk_theme = None, + use_ttk_buttons = None, + modal = False, + enable_close_attempted_event = False, + titlebar_background_color = None, + titlebar_text_color = None, + titlebar_font = None, + titlebar_icon = None, + use_custom_titlebar = None, + metadata = None) ``` Parameter Descriptions: @@ -9048,36 +9213,42 @@ Parameter Descriptions: | Tuple[int, int] or ((int, int),(int,int)) | element_padding | Default amount of padding to put around elements in window (left/right, top/bottom) or ((left, right), (top, bottom)) | | Tuple[int, int] | margins | (left/right, top/bottom) Amount of pixels to leave inside the window's frame around the edges before your elements are shown. | | Tuple[str, str] or str | button_color | Default button colors for all buttons in the window | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | +| str or Tuple[str, int] or None | font | specifies the font family, size, etc | | Tuple[str, str] | progress_bar_color | (bar color, background color) Sets the default colors for all progress bars in the window | | str | background_color | color of background | | int | border_depth | Default border depth (width) for all elements in the window | | bool | auto_close | If True, the window will automatically close itself | | int | auto_close_duration | Number of seconds to wait before closing the window | -| Union[str, str] | icon | Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | +| str | icon | Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | | bool | force_toplevel | If True will cause this window to skip the normal use of a hidden master window | | float | alpha_channel | Sets the opacity of the window. 0 = invisible 1 = completely visible. Values bewteen 0 & 1 will produce semi-transparent windows in SOME environments (The Raspberry Pi always has this value at 1 and cannot change. | | bool | return_keyboard_events | if True key presses on the keyboard will be returned as Events from Read calls | | bool | use_default_focus | If True will use the default focus algorithm to set the focus to the "Correct" element | -| Union['left', 'right', 'center'] | text_justification | Default text justification for all Text Elements in window | +| 'left' or 'right' or 'center' | text_justification | Default text justification for all Text Elements in window | | bool | no_titlebar | If true, no titlebar nor frame will be shown on window. This means you cannot minimize the window and it will not show up on the taskbar | | bool | grab_anywhere | If True can use mouse to click and drag to move the window. Almost every location of the window will work except input fields on some systems | | bool | keep_on_top | If True, window will be created on top of all other windows on screen. It can be bumped down if another window created with this parm | | bool | resizable | If True, allows the user to resize the window. Note the not all Elements will change size or location when resizing. | | bool | disable_close | If True, the X button in the top right corner of the window will no work. Use with caution and always give a way out toyour users | | bool | disable_minimize | if True the user won't be able to minimize window. Good for taking over entire screen and staying that way. | -| List[List[Union[List[str],str]]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | +| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | | str | transparent_color | Any portion of the window that has this color will be completely transparent. You can even click through these spots to the window under this window. | | bool | debugger_enabled | If True then the internal debugger will be enabled | | str | right_click_menu_background_color | Background color for right click menus | | str | right_click_menu_text_color | Text color for right click menus | | str | right_click_menu_disabled_text_color | Text color for disabled right click menu items | -| Union[str, Tuple[str, int]] | right_click_menu_font | Font for right click menus | +| str or Tuple[str, int] | right_click_menu_font | Font for right click menus | | bool | finalize | If True then the Finalize method will be called. Use this rather than chaining .Finalize for cleaner code | | str | element_justification | All elements in the Window itself will have this justification 'left', 'right', 'center' are valid values | | str | ttk_theme | Set the tkinter ttk "theme" of the window. Default = DEFAULT_TTK_THEME. Sets all ttk widgets to this theme as their default | | bool | use_ttk_buttons | Affects all buttons in window. True = use ttk buttons. False = do not use ttk buttons. None = use ttk buttons only if on a Mac | | bool | modal | If True then this window will be the only window a user can interact with until it is closed | +| bool | enable_close_attempted_event | If True then the window will not close when "X" clicked. Instead an event WINDOW_CLOSE_ATTEMPTED_EVENT if returned from window.read | +| (str or None) | titlebar_background_color | If custom titlebar indicated by use_custom_titlebar, then use this as background color | +| (str or None) | titlebar_text_color | If custom titlebar indicated by use_custom_titlebar, then use this as text color | +| (str or Tuple[str, int] or None) | titlebar_font | If custom titlebar indicated by use_custom_titlebar, then use this as title font | +| (bytes or str) | titlebar_icon | If custom titlebar indicated by use_custom_titlebar, then use this as the icon (file or base64 bytes) | +| bool | use_custom_titlebar | If True, then a custom titlebar will be used instead of the normal titlebar | | Any | metadata | User metadata that can be set to ANYTHING | ### AddRow @@ -9192,16 +9363,16 @@ Rememeber that this call will return None if no match is found which may cause y checked for. ``` -Elem(key, silent_on_error=False) +Elem(key, silent_on_error = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| bool | silent_on_error | If True do not display popup nor print warning of key errors | -| Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| bool | silent_on_error | If True do not display popup nor print warning of key errors | +| Element or Error Element or None | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; ### Element @@ -9225,16 +9396,16 @@ Rememeber that this call will return None if no match is found which may cause y checked for. ``` -Element(key, silent_on_error=False) +Element(key, silent_on_error = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| bool | silent_on_error | If True do not display popup nor print warning of key errors | -| Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| bool | silent_on_error | If True do not display popup nor print warning of key errors | +| Element or Error Element or None | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; ### Enable @@ -9264,7 +9435,7 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| (Dict[Any:Any]) - {Element_key : value} | values_dict | pairs | +| (Dict[Any, Any]) - {Element_key : value} | values_dict | pairs | | (Window) | **RETURN** | returns self so can be chained with other methods ### Finalize @@ -9301,16 +9472,16 @@ Rememeber that this call will return None if no match is found which may cause y checked for. ``` -Find(key, silent_on_error=False) +Find(key, silent_on_error = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| bool | silent_on_error | If True do not display popup nor print warning of key errors | -| Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| bool | silent_on_error | If True do not display popup nor print warning of key errors | +| Element or Error Element or None | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; ### FindElement @@ -9334,16 +9505,16 @@ Rememeber that this call will return None if no match is found which may cause y checked for. ``` -FindElement(key, silent_on_error=False) +FindElement(key, silent_on_error = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| bool | silent_on_error | If True do not display popup nor print warning of key errors | -| Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| bool | silent_on_error | If True do not display popup nor print warning of key errors | +| Element or Error Element or None | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; ### FindElementWithFocus @@ -9471,9 +9642,9 @@ Pass in a timeout (in milliseconds) to wait for a maximum of timeout millisecond if no other GUI events happen first. ``` -Read(timeout=None, - timeout_key="__TIMEOUT__", - close=False) +Read(timeout = None, + timeout_key = "__TIMEOUT__", + close = False) ``` Parameter Descriptions: @@ -9483,7 +9654,7 @@ Parameter Descriptions: | int | timeout | Milliseconds to wait until the Read will return IF no other GUI events happen first | | Any | timeout_key | The value that will be returned from the call if the timer expired | | bool | close | if True the window will be closed prior to returning | -| Tuple[(Any), Union[Dict[Any:Any]], List[Any], None] | **RETURN** | (event, values) +| Tuple[(Any), Dict[Any, Any], List[Any], None] | **RETURN** | (event, values) ### Reappear @@ -9552,7 +9723,7 @@ Can pass in: * BASE64 encoded file held in a variable ``` -SetIcon(icon=None, pngbase64=None) +SetIcon(icon = None, pngbase64 = None) ``` Parameter Descriptions: @@ -9652,8 +9823,8 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | bind_string | The string tkinter expected in its bind function | -| Union[str, int, tuple, object] | key | The event that will be generated when the tkinter event occurs | +| str | bind_string | The string tkinter expected in its bind function | +| str or int or tuple or object | key | The event that will be generated when the tkinter event occurs | ### bring_to_front @@ -9731,16 +9902,16 @@ Rememeber that this call will return None if no match is found which may cause y checked for. ``` -elem(key, silent_on_error=False) +elem(key, silent_on_error = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| bool | silent_on_error | If True do not display popup nor print warning of key errors | -| Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| bool | silent_on_error | If True do not display popup nor print warning of key errors | +| Element or Error Element or None | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; ### element @@ -9764,16 +9935,16 @@ Rememeber that this call will return None if no match is found which may cause y checked for. ``` -element(key, silent_on_error=False) +element(key, silent_on_error = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| bool | silent_on_error | If True do not display popup nor print warning of key errors | -| Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| bool | silent_on_error | If True do not display popup nor print warning of key errors | +| Element or Error Element or None | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; ### element_list @@ -9813,8 +9984,8 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| (Union[Frame, Column, Tab]) | container | The container Element the layout will be placed inside of | -| (List[List[Element]]) | rows | The layout to be added | +| Frame or Column or Tab | container | The container Element the layout will be placed inside of | +| (List[List[Element]]) | rows | The layout to be added | | (Window) | **RETURN** | (Window) self so could be chained ### fill @@ -9829,7 +10000,7 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| (Dict[Any:Any]) - {Element_key : value} | values_dict | pairs | +| (Dict[Any, Any]) - {Element_key : value} | values_dict | pairs | | (Window) | **RETURN** | returns self so can be chained with other methods ### finalize @@ -9866,16 +10037,16 @@ Rememeber that this call will return None if no match is found which may cause y checked for. ``` -find(key, silent_on_error=False) +find(key, silent_on_error = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| bool | silent_on_error | If True do not display popup nor print warning of key errors | -| Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| bool | silent_on_error | If True do not display popup nor print warning of key errors | +| Element or Error Element or None | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; ### find_element @@ -9899,16 +10070,16 @@ Rememeber that this call will return None if no match is found which may cause y checked for. ``` -find_element(key, silent_on_error=False) +find_element(key, silent_on_error = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| bool | silent_on_error | If True do not display popup nor print warning of key errors | -| Union[Element, Error Element, None] | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| bool | silent_on_error | If True do not display popup nor print warning of key errors | +| Element or Error Element or None | **RETURN** | Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; ### find_element_with_focus @@ -10068,9 +10239,9 @@ Pass in a timeout (in milliseconds) to wait for a maximum of timeout millisecond if no other GUI events happen first. ``` -read(timeout=None, - timeout_key="__TIMEOUT__", - close=False) +read(timeout = None, + timeout_key = "__TIMEOUT__", + close = False) ``` Parameter Descriptions: @@ -10080,7 +10251,7 @@ Parameter Descriptions: | int | timeout | Milliseconds to wait until the Read will return IF no other GUI events happen first | | Any | timeout_key | The value that will be returned from the call if the timer expired | | bool | close | if True the window will be closed prior to returning | -| Tuple[(Any), Union[Dict[Any:Any]], List[Any], None] | **RETURN** | (event, values) +| Tuple[(Any), Dict[Any, Any], List[Any], None] | **RETURN** | (event, values) ### reappear @@ -10149,7 +10320,7 @@ Can pass in: * BASE64 encoded file held in a variable ``` -set_icon(icon=None, pngbase64=None) +set_icon(icon = None, pngbase64 = None) ``` Parameter Descriptions: @@ -10253,6 +10424,222 @@ Parameter Descriptions: | Any | key | The key that will be returned as the event when reading the window | | Any | value | The value that will be in the values dictionary | +## SystemTray + + A "Simulated System Tray" that duplicates the API calls available to PySimpleGUIWx and PySimpleGUIQt users. + + All of the functionality works. The icon is displayed ABOVE the system tray rather than inside of it. + +SystemTray - create an icon in the system tray + +``` +SystemTray(menu = None, + filename = None, + data = None, + data_base64 = None, + tooltip = None, + metadata = None) +``` + +Parameter Descriptions: + +|Type|Name|Meaning| +|--|--|--| +| List[List[List[str] or str]] | menu | Menu definition. Example - ['UNUSED', ['My', 'Simple', '---', 'Menu', 'Exit']] | +| str | filename | filename for icon | +| bytes | data | in-ram image for icon (same as data_base64 parm) | +| bytes | data_base64 | base-64 data for icon | +| str | tooltip | tooltip string | +| Any | metadata | User metadata that can be set to ANYTHING | + +### Close + +Close the system tray window + +```python +Close() +``` + +### Hide + +Hides the icon + +```python +Hide() +``` + +### Read + +Reads the context menu + +``` +Read(timeout = None) +``` + +### ShowMessage + +Shows a balloon above icon in system tray + +``` +ShowMessage(title, + message, + filename = None, + data = None, + data_base64 = None, + messageicon = None, + time = (1000, 3000)) +``` + +Parameter Descriptions: + +|Type|Name|Meaning| +|--|--|--| +| str | title | Title shown in balloon | +| str | message | Message to be displayed | +| str | filename | Optional icon filename | +| b'' | data | Optional in-ram icon | +| b'' | data_base64 | Optional base64 icon | +| int or Tuple[int, int] | time | Amount of time to display message in milliseconds. If tuple, first item is fade in/out duration | +| Any | **RETURN** | The event that happened during the display such as user clicked on message + +### UnHide + +Restores a previously hidden icon + +```python +UnHide() +``` + +### Update + +Updates the menu, tooltip or icon + +``` +Update(menu = None, + tooltip = None, + filename = None, + data = None, + data_base64 = None) +``` + +Parameter Descriptions: + +|Type|Name|Meaning| +|--|--|--| +| ??? | menu | menu defintion | +| ??? | tooltip | string representing tooltip | +| ??? | filename | icon filename | +| ??? | data | icon raw image | +| ??? | data_base64 | icon base 64 image | + +### close + +Close the system tray window + +```python +close() +``` + +### hide + +Hides the icon + +```python +hide() +``` + +### notify + +Displays a "notification window", usually in the bottom right corner of your display. Has an icon, a title, and a message +The window will slowly fade in and out if desired. Clicking on the window will cause it to move through the end the current "phase". For example, if the window was fading in and it was clicked, then it would immediately stop fading in and instead be fully visible. It's a way for the user to quickly dismiss the window. + +``` +notify(title, + message, + icon = ..., + display_duration_in_ms = 3000, + fade_in_duration = 1000, + alpha = 0.9, + location = None) +``` + +Parameter Descriptions: + +|Type|Name|Meaning| +|--|--|--| +| str | title | Text to be shown at the top of the window in a larger font | +| str | message | Text message that makes up the majority of the window | +| bytes or str | icon | A base64 encoded PNG/GIF image or PNG/GIF filename that will be displayed in the window | +| int | display_duration_in_ms | Number of milliseconds to show the window | +| int | fade_in_duration | Number of milliseconds to fade window in and out | +| float | alpha | Alpha channel. 0 - invisible 1 - fully visible | +| Tuple[int, int] | location | Location on the screen to display the window | +| (int) | **RETURN** | (int) reason for returning + +### read + +Reads the context menu + +``` +read(timeout = None) +``` + +### show_message + +Shows a balloon above icon in system tray + +``` +show_message(title, + message, + filename = None, + data = None, + data_base64 = None, + messageicon = None, + time = (1000, 3000)) +``` + +Parameter Descriptions: + +|Type|Name|Meaning| +|--|--|--| +| str | title | Title shown in balloon | +| str | message | Message to be displayed | +| str | filename | Optional icon filename | +| b'' | data | Optional in-ram icon | +| b'' | data_base64 | Optional base64 icon | +| int or Tuple[int, int] | time | Amount of time to display message in milliseconds. If tuple, first item is fade in/out duration | +| Any | **RETURN** | The event that happened during the display such as user clicked on message + +### un_hide + +Restores a previously hidden icon + +```python +un_hide() +``` + +### update + +Updates the menu, tooltip or icon + +``` +update(menu = None, + tooltip = None, + filename = None, + data = None, + data_base64 = None) +``` + +Parameter Descriptions: + +|Type|Name|Meaning| +|--|--|--| +| ??? | menu | menu defintion | +| ??? | tooltip | string representing tooltip | +| ??? | filename | icon filename | +| ??? | data | icon raw image | +| ??? | data_base64 | icon base 64 image | + ## Function Reference These are the functions available for you to call @@ -10263,7 +10650,7 @@ Reads a list of windows. If any of the list returns a value then the window and are returned. ``` -read_all_windows(timeout=None, timeout_key="__TIMEOUT__") +read_all_windows(timeout = None, timeout_key = "__TIMEOUT__") ``` Parameter Descriptions: @@ -10280,525 +10667,525 @@ Button that will show a calendar chooser window. Fills in the target element wi ``` CalendarButton(button_text, - target=(555666777, -1), - close_when_date_chosen=True, - default_date_m_d_y=(None, None, None), - image_filename=None, - image_data=None, - image_size=(None, None), - image_subsample=None, - tooltip=None, - border_width=None, - size=(None, None), - auto_size_button=None, - button_color=None, - disabled=False, - font=None, - bind_return_key=False, - focus=False, - pad=None, - enable_events=None, - key=None, - k=None, - locale=None, - format="%Y-%m-%d %H:%M:%S", - begin_at_sunday_plus=0, - month_names=None, - day_abbreviations=None, - title="Choose Date", - no_titlebar=True, - location=(None, None), - metadata=None) + target = (555666777, -1), + close_when_date_chosen = True, + default_date_m_d_y = (None, None, None), + image_filename = None, + image_data = None, + image_size = (None, None), + image_subsample = None, + tooltip = None, + border_width = None, + size = (None, None), + auto_size_button = None, + button_color = None, + disabled = False, + font = None, + bind_return_key = False, + focus = False, + pad = None, + enable_events = None, + key = None, + k = None, + locale = None, + format = "%Y-%m-%d %H:%M:%S", + begin_at_sunday_plus = 0, + month_names = None, + day_abbreviations = None, + title = "Choose Date", + no_titlebar = True, + location = (None, None), + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button | -| Union[(int, int), Any] | target | Key or "coordinate" (see docs) of target element | -| bool | close_when_date_chosen | (Default = True) | -| (int, int or None, int) | default_date_m_d_y | Beginning date to show | -| image filename if there is a button image | image_filename | image filename if there is a button image | -| in-RAM image to be displayed on button | image_data | in-RAM image to be displayed on button | -| (Default = (None)) | image_size | image size (O.K.) | -| amount to reduce the size of the image | image_subsample | amount to reduce the size of the image | -| str | tooltip | text, that will appear when mouse hovers over the element | -| width of border around element | border_width | width of border around element | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | disabled | set disable state for element (Default = False) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | -| bool | focus | if focus should be set to this | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| str | locale | defines the locale used to get day names | -| str | format | formats result using this strftime format | -| List[str] | month_names | optional list of month names to use (should be 12 items) | -| List[str] | day_abbreviations | optional list of abbreviations to display as the day of week | -| str | title | Title shown on the date chooser window | -| bool | no_titlebar | if True no titlebar will be shown on the date chooser window | -| (int, int) | location | Location on the screen (x,y) to show the calendar popup window | -| Any | metadata | Anything you want to store along with this button | +| str | button_text | text in the button | +| (int, int) or Any | target | Key or "coordinate" (see docs) of target element | +| bool | close_when_date_chosen | (Default = True) | +| (int, int or None, int) | default_date_m_d_y | Beginning date to show | +| image filename if there is a button image | image_filename | image filename if there is a button image | +| in-RAM image to be displayed on button | image_data | in-RAM image to be displayed on button | +| (Default = (None)) | image_size | image size (O.K.) | +| amount to reduce the size of the image | image_subsample | amount to reduce the size of the image | +| str | tooltip | text, that will appear when mouse hovers over the element | +| width of border around element | border_width | width of border around element | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | disabled | set disable state for element (Default = False) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | +| bool | focus | if focus should be set to this | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | locale | defines the locale used to get day names | +| str | format | formats result using this strftime format | +| List[str] | month_names | optional list of month names to use (should be 12 items) | +| List[str] | day_abbreviations | optional list of abbreviations to display as the day of week | +| str | title | Title shown on the date chooser window | +| bool | no_titlebar | if True no titlebar will be shown on the date chooser window | +| (int, int) | location | Location on the screen (x,y) to show the calendar popup window | +| Any | metadata | Anything you want to store along with this button | | (Button) | **RETURN** | returns a button ``` -Cancel(button_text="Cancel", - size=(None, None), - auto_size_button=None, - button_color=None, - disabled=False, - tooltip=None, - font=None, - bind_return_key=False, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) +Cancel(button_text = "Cancel", + size = (None, None), + auto_size_button = None, + button_color = None, + disabled = False, + tooltip = None, + font = None, + bind_return_key = False, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'Cancel') | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | disabled | set disable state for element (Default = False) | -| str | tooltip | text, that will appear when mouse hovers over the element | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'Cancel') | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | disabled | set disable state for element (Default = False) | +| str | tooltip | text, that will appear when mouse hovers over the element | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ``` ColorChooserButton(button_text, - target=(None, None), - image_filename=None, - image_data=None, - image_size=(None, None), - image_subsample=None, - tooltip=None, - border_width=None, - size=(None, None), - auto_size_button=None, - button_color=None, - disabled=False, - font=None, - bind_return_key=False, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) + target = (None, None), + image_filename = None, + image_data = None, + image_size = (None, None), + image_subsample = None, + tooltip = None, + border_width = None, + size = (None, None), + auto_size_button = None, + button_color = None, + disabled = False, + font = None, + bind_return_key = False, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button | -| Union[str, Tuple[int, int]] | target | key or (row,col) target for the button. Note that -1 for column means 1 element to the left of this one. The constant ThisRow is used to indicate the current row. The Button itself is a valid target for some types of button | -| str | image_filename | image filename if there is a button image. GIFs and PNGs only. | -| Union[bytes, str] | image_data | Raw or Base64 representation of the image to put on button. Choose either filename or data | -| (int, int) | image_size | Size of the image in pixels (width, height) | -| int | image_subsample | amount to reduce the size of the image. Divides the size by this number. 2=1/2, 3=1/3, 4=1/4, etc | -| str | tooltip | text, that will appear when mouse hovers over the element | -| int | border_width | width of border around element | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | disabled | set disable state for element (Default = False) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | bind_return_key | If True, then the return key will cause a the Listbox to generate an event | -| bool | focus | Determines if initial focus should go to this element. | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| Any | metadata | User metadata that can be set to ANYTHING | +| str | button_text | text in the button | +| str or Tuple[int, int] | target | key or (row,col) target for the button. Note that -1 for column means 1 element to the left of this one. The constant ThisRow is used to indicate the current row. The Button itself is a valid target for some types of button | +| str | image_filename | image filename if there is a button image. GIFs and PNGs only. | +| bytes or str | image_data | Raw or Base64 representation of the image to put on button. Choose either filename or data | +| (int, int) | image_size | Size of the image in pixels (width, height) | +| int | image_subsample | amount to reduce the size of the image. Divides the size by this number. 2=1/2, 3=1/3, 4=1/4, etc | +| str | tooltip | text, that will appear when mouse hovers over the element | +| int | border_width | width of border around element | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | disabled | set disable state for element (Default = False) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | bind_return_key | If True, then the return key will cause a the Listbox to generate an event | +| bool | focus | Determines if initial focus should go to this element. | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| Any | metadata | User metadata that can be set to ANYTHING | | (Button) | **RETURN** | returns a button ``` -Debug(button_text="", - size=(None, None), - auto_size_button=None, - button_color=None, - disabled=False, - font=None, - tooltip=None, - bind_return_key=False, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) +Debug(button_text = "", + size = (None, None), + auto_size_button = None, + button_color = None, + disabled = False, + font = None, + tooltip = None, + bind_return_key = False, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = '') | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | disabled | set disable state for element (Default = False) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str | tooltip | text, that will appear when mouse hovers over the element | -| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| Any | metadata | Anything you want to store along with this button | +| str | button_text | text in the button (Default value = '') | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | disabled | set disable state for element (Default = False) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str | tooltip | text, that will appear when mouse hovers over the element | +| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| Any | metadata | Anything you want to store along with this button | | (Button) | **RETURN** | returns a button ``` DummyButton(button_text, - image_filename=None, - image_data=None, - image_size=(None, None), - image_subsample=None, - border_width=None, - tooltip=None, - size=(None, None), - auto_size_button=None, - button_color=None, - font=None, - disabled=False, - bind_return_key=False, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) + image_filename = None, + image_data = None, + image_size = (None, None), + image_subsample = None, + border_width = None, + tooltip = None, + size = (None, None), + auto_size_button = None, + button_color = None, + font = None, + disabled = False, + bind_return_key = False, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button | -| image filename if there is a button image | image_filename | image filename if there is a button image | -| in-RAM image to be displayed on button | image_data | in-RAM image to be displayed on button | -| (Default = (None)) | image_size | image size (O.K.) | -| amount to reduce the size of the image | image_subsample | amount to reduce the size of the image | -| str | tooltip | text, that will appear when mouse hovers over the element | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | disabled | set disable state for element (Default = False) | -| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | -| bool | focus | if focus should be set to this | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| Any | metadata | Anything you want to store along with this button | -| int | border_width | width of border around element | +| str | button_text | text in the button | +| image filename if there is a button image | image_filename | image filename if there is a button image | +| in-RAM image to be displayed on button | image_data | in-RAM image to be displayed on button | +| (Default = (None)) | image_size | image size (O.K.) | +| amount to reduce the size of the image | image_subsample | amount to reduce the size of the image | +| str | tooltip | text, that will appear when mouse hovers over the element | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | disabled | set disable state for element (Default = False) | +| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | +| bool | focus | if focus should be set to this | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| Any | metadata | Anything you want to store along with this button | +| int | border_width | width of border around element | | (Button) | **RETURN** | returns a button ``` -Exit(button_text="Exit", - size=(None, None), - auto_size_button=None, - button_color=None, - disabled=False, - tooltip=None, - font=None, - bind_return_key=False, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) +Exit(button_text = "Exit", + size = (None, None), + auto_size_button = None, + button_color = None, + disabled = False, + tooltip = None, + font = None, + bind_return_key = False, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'Exit') | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | disabled | set disable state for element (Default = False) | -| str | tooltip | text, that will appear when mouse hovers over the element | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'Exit') | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | disabled | set disable state for element (Default = False) | +| str | tooltip | text, that will appear when mouse hovers over the element | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ``` -FileBrowse(button_text="Browse", - target=(555666777, -1), - file_types=(('ALL Files', '*.*'),), - initial_folder=None, - tooltip=None, - size=(None, None), - auto_size_button=None, - button_color=None, - change_submits=False, - enable_events=False, - font=None, - disabled=False, - pad=None, - key=None, - k=None, - metadata=None) +FileBrowse(button_text = "Browse", + target = (555666777, -1), + file_types = (('ALL Files', '*.*'),), + initial_folder = None, + tooltip = None, + size = (None, None), + auto_size_button = None, + button_color = None, + change_submits = False, + enable_events = False, + font = None, + disabled = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'Browse') | -| Tuple[Tuple[str, str], ...] | target | key or (row,col) target for the button (Default value = (ThisRow, -1)) :param file_types: filter file types (Default value = (("ALL Files", "*.*"))) | -| str | initial_folder | starting path for folders and files :param tooltip: text, that will appear when mouse hovers over the element | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | change_submits | If True, pressing Enter key submits window (Default = False) | -| bool | enable_events | Turns on the element specific events.(Default = False) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | disabled | set disable state for element (Default = False) | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'Browse') | +| Tuple[Tuple[str, str], ...] | target | key or (row,col) target for the button (Default value = (ThisRow, -1)) :param file_types: filter file types (Default value = (("ALL Files", "*.*"))) | +| str | initial_folder | starting path for folders and files :param tooltip: text, that will appear when mouse hovers over the element | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | change_submits | If True, pressing Enter key submits window (Default = False) | +| bool | enable_events | Turns on the element specific events.(Default = False) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | disabled | set disable state for element (Default = False) | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ``` -FileSaveAs(button_text="Save As...", - target=(555666777, -1), - file_types=(('ALL Files', '*.*'),), - initial_folder=None, - default_extension="", - disabled=False, - tooltip=None, - size=(None, None), - auto_size_button=None, - button_color=None, - change_submits=False, - enable_events=False, - font=None, - pad=None, - key=None, - k=None, - metadata=None) +FileSaveAs(button_text = "Save As...", + target = (555666777, -1), + file_types = (('ALL Files', '*.*'),), + initial_folder = None, + default_extension = "", + disabled = False, + tooltip = None, + size = (None, None), + auto_size_button = None, + button_color = None, + change_submits = False, + enable_events = False, + font = None, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'Save As...') | -| Tuple[Tuple[str, str], ...] | target | key or (row,col) target for the button (Default value = (ThisRow, -1)) :param file_types: (Default value = (("ALL Files", "*.*"))) | -| str | default_extension | If no extension entered by user, add this to filename (only used in saveas dialogs) | -| str | initial_folder | starting path for folders and files | -| bool | disabled | set disable state for element (Default = False) | -| str | tooltip | text, that will appear when mouse hovers over the element | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | change_submits | If True, pressing Enter key submits window (Default = False) | -| bool | enable_events | Turns on the element specific events.(Default = False) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'Save As...') | +| Tuple[Tuple[str, str], ...] | target | key or (row,col) target for the button (Default value = (ThisRow, -1)) :param file_types: (Default value = (("ALL Files", "*.*"))) | +| str | default_extension | If no extension entered by user, add this to filename (only used in saveas dialogs) | +| str | initial_folder | starting path for folders and files | +| bool | disabled | set disable state for element (Default = False) | +| str | tooltip | text, that will appear when mouse hovers over the element | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | change_submits | If True, pressing Enter key submits window (Default = False) | +| bool | enable_events | Turns on the element specific events.(Default = False) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button Allows browsing of multiple files. File list is returned as a single list with the delimeter defined using the variable BROWSE_FILES_DELIMETER. This defaults to ';' but is changable by the user ``` -FilesBrowse(button_text="Browse", - target=(555666777, -1), - file_types=(('ALL Files', '*.*'),), - disabled=False, - initial_folder=None, - tooltip=None, - size=(None, None), - auto_size_button=None, - button_color=None, - change_submits=False, - enable_events=False, - font=None, - pad=None, - key=None, - k=None, - metadata=None) +FilesBrowse(button_text = "Browse", + target = (555666777, -1), + file_types = (('ALL Files', '*.*'),), + disabled = False, + initial_folder = None, + tooltip = None, + size = (None, None), + auto_size_button = None, + button_color = None, + change_submits = False, + enable_events = False, + font = None, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'Browse') | -| Tuple[Tuple[str, str], ...] | target | key or (row,col) target for the button (Default value = (ThisRow, -1)) :param file_types: (Default value = (("ALL Files", "*.*"))) | -| bool | disabled | set disable state for element (Default = False) | -| str | initial_folder | starting path for folders and files | -| str | tooltip | text, that will appear when mouse hovers over the element | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | change_submits | If True, pressing Enter key submits window (Default = False) | -| bool | enable_events | Turns on the element specific events.(Default = False) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'Browse') | +| Tuple[Tuple[str, str], ...] | target | key or (row,col) target for the button (Default value = (ThisRow, -1)) :param file_types: (Default value = (("ALL Files", "*.*"))) | +| bool | disabled | set disable state for element (Default = False) | +| str | initial_folder | starting path for folders and files | +| str | tooltip | text, that will appear when mouse hovers over the element | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | change_submits | If True, pressing Enter key submits window (Default = False) | +| bool | enable_events | Turns on the element specific events.(Default = False) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ``` -FolderBrowse(button_text="Browse", - target=(555666777, -1), - initial_folder=None, - tooltip=None, - size=(None, None), - auto_size_button=None, - button_color=None, - disabled=False, - change_submits=False, - enable_events=False, - font=None, - pad=None, - key=None, - k=None, - metadata=None) +FolderBrowse(button_text = "Browse", + target = (555666777, -1), + initial_folder = None, + tooltip = None, + size = (None, None), + auto_size_button = None, + button_color = None, + disabled = False, + change_submits = False, + enable_events = False, + font = None, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'Browse') | -| key or (row,col) | target | target for the button (Default value = (ThisRow, -1)) | -| str | initial_folder | starting path for folders and files | -| str | tooltip | text, that will appear when mouse hovers over the element | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| bool | button_color | button color (foreground, background) :param disabled: set disable state for element (Default = False) | -| bool | change_submits | If True, pressing Enter key submits window (Default = False) | -| bool | enable_events | Turns on the element specific events.(Default = False) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element | -| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'Browse') | +| key or (row,col) | target | target for the button (Default value = (ThisRow, -1)) | +| str | initial_folder | starting path for folders and files | +| str | tooltip | text, that will appear when mouse hovers over the element | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| bool | button_color | button color (foreground, background) :param disabled: set disable state for element (Default = False) | +| bool | change_submits | If True, pressing Enter key submits window (Default = False) | +| bool | enable_events | Turns on the element specific events.(Default = False) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element | +| str or int or tuple or object | key | Used with window.FindElement and with return values to uniquely identify this element | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | The Button created ``` -Help(button_text="Help", - size=(None, None), - auto_size_button=None, - button_color=None, - disabled=False, - font=None, - tooltip=None, - bind_return_key=False, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) +Help(button_text = "Help", + size = (None, None), + auto_size_button = None, + button_color = None, + disabled = False, + font = None, + tooltip = None, + bind_return_key = False, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'Help') | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | disabled | set disable state for element (Default = False) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str | tooltip | text, that will appear when mouse hovers over the element | -| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'Help') | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | disabled | set disable state for element (Default = False) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str | tooltip | text, that will appear when mouse hovers over the element | +| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ``` -No(button_text="No", - size=(None, None), - auto_size_button=None, - button_color=None, - disabled=False, - tooltip=None, - font=None, - bind_return_key=False, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) +No(button_text = "No", + size = (None, None), + auto_size_button = None, + button_color = None, + disabled = False, + tooltip = None, + font = None, + bind_return_key = False, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'No') | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | disabled | set disable state for element (Default = False) | -| str | tooltip | text, that will appear when mouse hovers over the element | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'No') | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | disabled | set disable state for element (Default = False) | +| str | tooltip | text, that will appear when mouse hovers over the element | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ``` -OK(button_text="OK", - size=(None, None), - auto_size_button=None, - button_color=None, - disabled=False, - bind_return_key=True, - tooltip=None, - font=None, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) +OK(button_text = "OK", + size = (None, None), + auto_size_button = None, + button_color = None, + disabled = False, + bind_return_key = True, + tooltip = None, + font = None, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'OK') | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | disabled | set disable state for element (Default = False) | -| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | -| str | tooltip | text, that will appear when mouse hovers over the element | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| idk_yetReally | focus | if focus should be set to this | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'OK') | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | disabled | set disable state for element (Default = False) | +| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | +| str | tooltip | text, that will appear when mouse hovers over the element | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| idk_yetReally | focus | if focus should be set to this | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button Dumps an Object's values as a formatted string. Very nicely done. Great way to display an object's member variables in human form ``` -ObjToString(obj, extra=" ") +ObjToString(obj, extra = " ") ``` Parameter Descriptions: @@ -10824,291 +11211,291 @@ Parameter Descriptions: | (str) | **RETURN** | Formatted output of the object's values ``` -Ok(button_text="Ok", - size=(None, None), - auto_size_button=None, - button_color=None, - disabled=False, - bind_return_key=True, - tooltip=None, - font=None, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) +Ok(button_text = "Ok", + size = (None, None), + auto_size_button = None, + button_color = None, + disabled = False, + bind_return_key = True, + tooltip = None, + font = None, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'Ok') | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | disabled | set disable state for element (Default = False) | -| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | -| str | tooltip | text, that will appear when mouse hovers over the element | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| idk_yetReally | focus | if focus should be set to this | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'Ok') | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | disabled | set disable state for element (Default = False) | +| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | +| str | tooltip | text, that will appear when mouse hovers over the element | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| idk_yetReally | focus | if focus should be set to this | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ``` -Open(button_text="Open", - size=(None, None), - auto_size_button=None, - button_color=None, - disabled=False, - bind_return_key=True, - tooltip=None, - font=None, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) +Open(button_text = "Open", + size = (None, None), + auto_size_button = None, + button_color = None, + disabled = False, + bind_return_key = True, + tooltip = None, + font = None, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'Open') | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | disabled | set disable state for element (Default = False) | -| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | -| str | tooltip | text, that will appear when mouse hovers over the element | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| idk_yetReally | focus | if focus should be set to this | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'Open') | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | disabled | set disable state for element (Default = False) | +| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | +| str | tooltip | text, that will appear when mouse hovers over the element | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| idk_yetReally | focus | if focus should be set to this | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ``` -Quit(button_text="Quit", - size=(None, None), - auto_size_button=None, - button_color=None, - disabled=False, - tooltip=None, - font=None, - bind_return_key=False, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) +Quit(button_text = "Quit", + size = (None, None), + auto_size_button = None, + button_color = None, + disabled = False, + tooltip = None, + font = None, + bind_return_key = False, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'Quit') | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | disabled | set disable state for element (Default = False) | -| str | tooltip | text, that will appear when mouse hovers over the element | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'Quit') | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | disabled | set disable state for element (Default = False) | +| str | tooltip | text, that will appear when mouse hovers over the element | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ``` RealtimeButton(button_text, - image_filename=None, - image_data=None, - image_size=(None, None), - image_subsample=None, - border_width=None, - tooltip=None, - size=(None, None), - auto_size_button=None, - button_color=None, - font=None, - disabled=False, - bind_return_key=False, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) + image_filename = None, + image_data = None, + image_size = (None, None), + image_subsample = None, + border_width = None, + tooltip = None, + size = (None, None), + auto_size_button = None, + button_color = None, + font = None, + disabled = False, + bind_return_key = False, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button | -| image filename if there is a button image | image_filename | image filename if there is a button image | -| in-RAM image to be displayed on button | image_data | in-RAM image to be displayed on button | -| (Default = (None)) | image_size | image size (O.K.) | -| amount to reduce the size of the image | image_subsample | amount to reduce the size of the image | -| str | tooltip | text, that will appear when mouse hovers over the element | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | disabled | set disable state for element (Default = False) | -| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | -| bool | focus | if focus should be set to this | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| int | border_width | width of border around element | -| Any | metadata | Anything you want to store along with this button | +| str | button_text | text in the button | +| image filename if there is a button image | image_filename | image filename if there is a button image | +| in-RAM image to be displayed on button | image_data | in-RAM image to be displayed on button | +| (Default = (None)) | image_size | image size (O.K.) | +| amount to reduce the size of the image | image_subsample | amount to reduce the size of the image | +| str | tooltip | text, that will appear when mouse hovers over the element | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | disabled | set disable state for element (Default = False) | +| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | +| bool | focus | if focus should be set to this | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| int | border_width | width of border around element | +| Any | metadata | Anything you want to store along with this button | | (Button) | **RETURN** | Button created ``` -Save(button_text="Save", - size=(None, None), - auto_size_button=None, - button_color=None, - bind_return_key=True, - disabled=False, - tooltip=None, - font=None, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) +Save(button_text = "Save", + size = (None, None), + auto_size_button = None, + button_color = None, + bind_return_key = True, + disabled = False, + tooltip = None, + font = None, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'Save') | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | -| bool | disabled | set disable state for element (Default = False) | -| str | tooltip | text, that will appear when mouse hovers over the element | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| idk_yetReally | focus | if focus should be set to this | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'Save') | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | +| bool | disabled | set disable state for element (Default = False) | +| str | tooltip | text, that will appear when mouse hovers over the element | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| idk_yetReally | focus | if focus should be set to this | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ``` -SaveAs(button_text="Save As...", - target=(555666777, -1), - file_types=(('ALL Files', '*.*'),), - initial_folder=None, - default_extension="", - disabled=False, - tooltip=None, - size=(None, None), - auto_size_button=None, - button_color=None, - change_submits=False, - enable_events=False, - font=None, - pad=None, - key=None, - k=None, - metadata=None) +SaveAs(button_text = "Save As...", + target = (555666777, -1), + file_types = (('ALL Files', '*.*'),), + initial_folder = None, + default_extension = "", + disabled = False, + tooltip = None, + size = (None, None), + auto_size_button = None, + button_color = None, + change_submits = False, + enable_events = False, + font = None, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'Save As...') | -| Tuple[Tuple[str, str], ...] | target | key or (row,col) target for the button (Default value = (ThisRow, -1)) :param file_types: (Default value = (("ALL Files", "*.*"))) | -| str | default_extension | If no extension entered by user, add this to filename (only used in saveas dialogs) | -| str | initial_folder | starting path for folders and files | -| bool | disabled | set disable state for element (Default = False) | -| str | tooltip | text, that will appear when mouse hovers over the element | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | change_submits | If True, pressing Enter key submits window (Default = False) | -| bool | enable_events | Turns on the element specific events.(Default = False) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'Save As...') | +| Tuple[Tuple[str, str], ...] | target | key or (row,col) target for the button (Default value = (ThisRow, -1)) :param file_types: (Default value = (("ALL Files", "*.*"))) | +| str | default_extension | If no extension entered by user, add this to filename (only used in saveas dialogs) | +| str | initial_folder | starting path for folders and files | +| bool | disabled | set disable state for element (Default = False) | +| str | tooltip | text, that will appear when mouse hovers over the element | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | change_submits | If True, pressing Enter key submits window (Default = False) | +| bool | enable_events | Turns on the element specific events.(Default = False) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ``` -Submit(button_text="Submit", - size=(None, None), - auto_size_button=None, - button_color=None, - disabled=False, - bind_return_key=True, - tooltip=None, - font=None, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) +Submit(button_text = "Submit", + size = (None, None), + auto_size_button = None, + button_color = None, + disabled = False, + bind_return_key = True, + tooltip = None, + font = None, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'Submit') | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | disabled | set disable state for element (Default = False) | -| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | -| str | tooltip | text, that will appear when mouse hovers over the element | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| idk_yetReally | focus | if focus should be set to this | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'Submit') | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | disabled | set disable state for element (Default = False) | +| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | +| str | tooltip | text, that will appear when mouse hovers over the element | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| idk_yetReally | focus | if focus should be set to this | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ``` -Yes(button_text="Yes", - size=(None, None), - auto_size_button=None, - button_color=None, - disabled=False, - tooltip=None, - font=None, - bind_return_key=True, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) +Yes(button_text = "Yes", + size = (None, None), + auto_size_button = None, + button_color = None, + disabled = False, + tooltip = None, + font = None, + bind_return_key = True, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button (Default value = 'Yes') | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | disabled | set disable state for element (Default = False) | -| str | tooltip | text, that will appear when mouse hovers over the element | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button (Default value = 'Yes') | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | disabled | set disable state for element (Default = False) | +| str | tooltip | text, that will appear when mouse hovers over the element | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | focus | if focus should be set to this :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ## Button No Longer To Be Used @@ -11118,178 +11505,178 @@ They are shown here in case you run into them in some old code. ``` RButton(button_text, - image_filename=None, - image_data=None, - image_size=(None, None), - image_subsample=None, - border_width=None, - tooltip=None, - size=(None, None), - auto_size_button=None, - button_color=None, - font=None, - bind_return_key=False, - disabled=False, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) + image_filename = None, + image_data = None, + image_size = (None, None), + image_subsample = None, + border_width = None, + tooltip = None, + size = (None, None), + auto_size_button = None, + button_color = None, + font = None, + bind_return_key = False, + disabled = False, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button | -| image filename if there is a button image | image_filename | image filename if there is a button image | -| in-RAM image to be displayed on button | image_data | in-RAM image to be displayed on button | -| (Default = (None)) | image_size | image size (O.K.) | -| amount to reduce the size of the image | image_subsample | amount to reduce the size of the image | -| str | tooltip | text, that will appear when mouse hovers over the element | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | -| bool | disabled | set disable state for element (Default = False) | -| idk_yetReally | focus | if focus should be set to this | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| int | border_width | width of border around element | -| Any | metadata | Anything you want to store along with this button | +| str | button_text | text in the button | +| image filename if there is a button image | image_filename | image filename if there is a button image | +| in-RAM image to be displayed on button | image_data | in-RAM image to be displayed on button | +| (Default = (None)) | image_size | image size (O.K.) | +| amount to reduce the size of the image | image_subsample | amount to reduce the size of the image | +| str | tooltip | text, that will appear when mouse hovers over the element | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | +| bool | disabled | set disable state for element (Default = False) | +| idk_yetReally | focus | if focus should be set to this | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| int | border_width | width of border around element | +| Any | metadata | Anything you want to store along with this button | | (Button) | **RETURN** | Button created ``` ReadButton(button_text, - image_filename=None, - image_data=None, - image_size=(None, None), - image_subsample=None, - border_width=None, - tooltip=None, - size=(None, None), - auto_size_button=None, - button_color=None, - font=None, - bind_return_key=False, - disabled=False, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) + image_filename = None, + image_data = None, + image_size = (None, None), + image_subsample = None, + border_width = None, + tooltip = None, + size = (None, None), + auto_size_button = None, + button_color = None, + font = None, + bind_return_key = False, + disabled = False, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button | -| image filename if there is a button image | image_filename | image filename if there is a button image | -| in-RAM image to be displayed on button | image_data | in-RAM image to be displayed on button | -| (Default = (None)) | image_size | image size (O.K.) | -| amount to reduce the size of the image | image_subsample | amount to reduce the size of the image | -| str | tooltip | text, that will appear when mouse hovers over the element | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | -| bool | disabled | set disable state for element (Default = False) | -| idk_yetReally | focus | if focus should be set to this | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | -| int | border_width | width of border around element | -| Any | metadata | Anything you want to store along with this button | +| str | button_text | text in the button | +| image filename if there is a button image | image_filename | image filename if there is a button image | +| in-RAM image to be displayed on button | image_data | in-RAM image to be displayed on button | +| (Default = (None)) | image_size | image size (O.K.) | +| amount to reduce the size of the image | image_subsample | amount to reduce the size of the image | +| str | tooltip | text, that will appear when mouse hovers over the element | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | +| bool | disabled | set disable state for element (Default = False) | +| idk_yetReally | focus | if focus should be set to this | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| int | border_width | width of border around element | +| Any | metadata | Anything you want to store along with this button | | (Button) | **RETURN** | Button created ``` CButton(button_text, - image_filename=None, - image_data=None, - image_size=(None, None), - image_subsample=None, - border_width=None, - tooltip=None, - size=(None, None), - auto_size_button=None, - button_color=None, - font=None, - bind_return_key=False, - disabled=False, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) + image_filename = None, + image_data = None, + image_size = (None, None), + image_subsample = None, + border_width = None, + tooltip = None, + size = (None, None), + auto_size_button = None, + button_color = None, + font = None, + bind_return_key = False, + disabled = False, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button | -| image filename if there is a button image | image_filename | image filename if there is a button image | -| in-RAM image to be displayed on button | image_data | in-RAM image to be displayed on button | -| (Default = (None)) | image_size | image size (O.K.) | -| amount to reduce the size of the image | image_subsample | amount to reduce the size of the image | -| str | tooltip | text, that will appear when mouse hovers over the element | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | -| bool | disabled | set disable state for element (Default = False) | -| idk_yetReally | focus | if focus should be set to this | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button | +| image filename if there is a button image | image_filename | image filename if there is a button image | +| in-RAM image to be displayed on button | image_data | in-RAM image to be displayed on button | +| (Default = (None)) | image_size | image size (O.K.) | +| amount to reduce the size of the image | image_subsample | amount to reduce the size of the image | +| str | tooltip | text, that will appear when mouse hovers over the element | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | +| bool | disabled | set disable state for element (Default = False) | +| idk_yetReally | focus | if focus should be set to this | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ``` CloseButton(button_text, - image_filename=None, - image_data=None, - image_size=(None, None), - image_subsample=None, - border_width=None, - tooltip=None, - size=(None, None), - auto_size_button=None, - button_color=None, - font=None, - bind_return_key=False, - disabled=False, - focus=False, - pad=None, - key=None, - k=None, - metadata=None) + image_filename = None, + image_data = None, + image_size = (None, None), + image_subsample = None, + border_width = None, + tooltip = None, + size = (None, None), + auto_size_button = None, + button_color = None, + font = None, + bind_return_key = False, + disabled = False, + focus = False, + pad = None, + key = None, + k = None, + metadata = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | button_text | text in the button | -| image filename if there is a button image | image_filename | image filename if there is a button image | -| in-RAM image to be displayed on button | image_data | in-RAM image to be displayed on button | -| (Default = (None)) | image_size | image size (O.K.) | -| amount to reduce the size of the image | image_subsample | amount to reduce the size of the image | -| str | tooltip | text, that will appear when mouse hovers over the element | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| bool | auto_size_button | True if button size is determined by button text | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | -| bool | disabled | set disable state for element (Default = False) | -| idk_yetReally | focus | if focus should be set to this | -| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | -| Union[str, int, tuple, object] | key | key for uniquely identify this element (for window.FindElement) | -| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. | +| str | button_text | text in the button | +| image filename if there is a button image | image_filename | image filename if there is a button image | +| in-RAM image to be displayed on button | image_data | in-RAM image to be displayed on button | +| (Default = (None)) | image_size | image size (O.K.) | +| amount to reduce the size of the image | image_subsample | amount to reduce the size of the image | +| str | tooltip | text, that will appear when mouse hovers over the element | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| bool | auto_size_button | True if button size is determined by button text | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | +| bool | disabled | set disable state for element (Default = False) | +| idk_yetReally | focus | if focus should be set to this | +| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element in pixels (left/right, top/bottom) | +| str or int or tuple or object | key | key for uniquely identify this element (for window.FindElement) | +| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | (Button) | **RETURN** | returns a button ## Debug Window Output @@ -11298,38 +11685,38 @@ Works like a "print" statement but with windowing options. Routes output to the ``` easy_print(args=*<1 or N object>, - size=(None, None), - end=None, - sep=None, - location=(None, None), - font=None, - no_titlebar=False, - no_button=False, - grab_anywhere=False, - keep_on_top=False, - do_not_reroute_stdout=True, - text_color=None, - background_color=None) + size = (None, None), + end = None, + sep = None, + location = (None, None), + font = None, + no_titlebar = False, + no_button = False, + grab_anywhere = False, + keep_on_top = False, + do_not_reroute_stdout = True, + text_color = None, + background_color = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | stuff to output | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| str | end | end character | -| str | sep | separator character | -| Tuple[int, int] | location | Location of upper left corner of the window | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | no_button | don't show button | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| bool | do_not_reroute_stdout | do not reroute stdout | +| Any | *args | stuff to output | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| str | end | end character | +| str | sep | separator character | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | no_button | don't show button | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| bool | do_not_reroute_stdout | do not reroute stdout | Close a previously opened EasyPrint window @@ -11341,75 +11728,75 @@ Works like a "print" statement but with windowing options. Routes output to the ``` eprint(args=*<1 or N object>, - size=(None, None), - end=None, - sep=None, - location=(None, None), - font=None, - no_titlebar=False, - no_button=False, - grab_anywhere=False, - keep_on_top=False, - do_not_reroute_stdout=True, - text_color=None, - background_color=None) + size = (None, None), + end = None, + sep = None, + location = (None, None), + font = None, + no_titlebar = False, + no_button = False, + grab_anywhere = False, + keep_on_top = False, + do_not_reroute_stdout = True, + text_color = None, + background_color = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | stuff to output | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| str | end | end character | -| str | sep | separator character | -| Tuple[int, int] | location | Location of upper left corner of the window | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | no_button | don't show button | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| bool | do_not_reroute_stdout | do not reroute stdout | +| Any | *args | stuff to output | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| str | end | end character | +| str | sep | separator character | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | no_button | don't show button | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| bool | do_not_reroute_stdout | do not reroute stdout | Works like a "print" statement but with windowing options. Routes output to the "Debug Window" ``` sgprint(args=*<1 or N object>, - size=(None, None), - end=None, - sep=None, - location=(None, None), - font=None, - no_titlebar=False, - no_button=False, - grab_anywhere=False, - keep_on_top=False, - do_not_reroute_stdout=True, - text_color=None, - background_color=None) + size = (None, None), + end = None, + sep = None, + location = (None, None), + font = None, + no_titlebar = False, + no_button = False, + grab_anywhere = False, + keep_on_top = False, + do_not_reroute_stdout = True, + text_color = None, + background_color = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | stuff to output | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| str | end | end character | -| str | sep | separator character | -| Tuple[int, int] | location | Location of upper left corner of the window | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | no_button | don't show button | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| bool | do_not_reroute_stdout | do not reroute stdout | +| Any | *args | stuff to output | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| str | end | end character | +| str | sep | separator character | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | no_button | don't show button | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| bool | do_not_reroute_stdout | do not reroute stdout | Close a previously opened EasyPrint window @@ -11421,38 +11808,38 @@ Works like a "print" statement but with windowing options. Routes output to the ``` EasyPrint(args=*<1 or N object>, - size=(None, None), - end=None, - sep=None, - location=(None, None), - font=None, - no_titlebar=False, - no_button=False, - grab_anywhere=False, - keep_on_top=False, - do_not_reroute_stdout=True, - text_color=None, - background_color=None) + size = (None, None), + end = None, + sep = None, + location = (None, None), + font = None, + no_titlebar = False, + no_button = False, + grab_anywhere = False, + keep_on_top = False, + do_not_reroute_stdout = True, + text_color = None, + background_color = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | stuff to output | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| str | end | end character | -| str | sep | separator character | -| Tuple[int, int] | location | Location of upper left corner of the window | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | no_button | don't show button | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| bool | do_not_reroute_stdout | do not reroute stdout | +| Any | *args | stuff to output | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| str | end | end character | +| str | sep | separator character | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | no_button | don't show button | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| bool | do_not_reroute_stdout | do not reroute stdout | Close a previously opened EasyPrint window @@ -11464,38 +11851,38 @@ Works like a "print" statement but with windowing options. Routes output to the ``` Print(args=*<1 or N object>, - size=(None, None), - end=None, - sep=None, - location=(None, None), - font=None, - no_titlebar=False, - no_button=False, - grab_anywhere=False, - keep_on_top=False, - do_not_reroute_stdout=True, - text_color=None, - background_color=None) + size = (None, None), + end = None, + sep = None, + location = (None, None), + font = None, + no_titlebar = False, + no_button = False, + grab_anywhere = False, + keep_on_top = False, + do_not_reroute_stdout = True, + text_color = None, + background_color = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | stuff to output | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| str | end | end character | -| str | sep | separator character | -| Tuple[int, int] | location | Location of upper left corner of the window | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | no_button | don't show button | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| bool | do_not_reroute_stdout | do not reroute stdout | +| Any | *args | stuff to output | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| str | end | end character | +| str | sep | separator character | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | no_button | don't show button | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| bool | do_not_reroute_stdout | do not reroute stdout | Close a previously opened EasyPrint window @@ -11534,17 +11921,17 @@ cprint('This will print white text on red background', t='white', b='red') ``` cprint(args=*<1 or N object>, - end=None, - sep=" ", - text_color=None, - t=None, - background_color=None, - b=None, - colors=None, - c=None, - window=None, - key=None, - justification=None) + end = None, + sep = " ", + text_color = None, + t = None, + background_color = None, + b = None, + colors = None, + c = None, + window = None, + key = None, + justification = None) ``` Parameter Descriptions: @@ -11584,39 +11971,39 @@ Parameter Descriptions: OneLineProgressMeter(title, current_value, max_value, - key="OK for 1 meter", + key = "OK for 1 meter", args=*<1 or N object>, - orientation="v", - bar_color=(None, None), - button_color=None, - size=(20, 20), - border_width=None, - grab_anywhere=False, - no_titlebar=False) + orientation = "v", + bar_color = (None, None), + button_color = None, + size = (20, 20), + border_width = None, + grab_anywhere = False, + no_titlebar = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | title | text to display in eleemnt | -| int | current_value | current value | -| int | max_value | max value of QuickMeter | -| Union[str, int, tuple, object] | key | Used to differentiate between mutliple meters. Used to cancel meter early. Now optional as there is a default value for single meters | -| Any | *args | stuff to output | -| str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') | -| Tuple(str, str) | bar_color | color of a bar line | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high (Default value = DEFAULT_PROGRESS_BAR_SIZE) | -| int | border_width | width of border around element | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | no_titlebar | If True: no titlebar will be shown on the window | +| str | title | text to display in eleemnt | +| int | current_value | current value | +| int | max_value | max value of QuickMeter | +| str or int or tuple or object | key | Used to differentiate between mutliple meters. Used to cancel meter early. Now optional as there is a default value for single meters | +| Any | *args | stuff to output | +| str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') | +| Tuple(str, str) | bar_color | color of a bar line | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high (Default value = DEFAULT_PROGRESS_BAR_SIZE) | +| int | border_width | width of border around element | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | no_titlebar | If True: no titlebar will be shown on the window | | (bool) | **RETURN** | True if updated successfully. False if user closed the meter with the X or Cancel button Cancels and closes a previously created One Line Progress Meter window ``` -OneLineProgressMeterCancel(key="OK for 1 meter") +OneLineProgressMeterCancel(key = "OK for 1 meter") ``` Parameter Descriptions: @@ -11630,39 +12017,39 @@ Parameter Descriptions: one_line_progress_meter(title, current_value, max_value, - key="OK for 1 meter", + key = "OK for 1 meter", args=*<1 or N object>, - orientation="v", - bar_color=(None, None), - button_color=None, - size=(20, 20), - border_width=None, - grab_anywhere=False, - no_titlebar=False) + orientation = "v", + bar_color = (None, None), + button_color = None, + size = (20, 20), + border_width = None, + grab_anywhere = False, + no_titlebar = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | title | text to display in eleemnt | -| int | current_value | current value | -| int | max_value | max value of QuickMeter | -| Union[str, int, tuple, object] | key | Used to differentiate between mutliple meters. Used to cancel meter early. Now optional as there is a default value for single meters | -| Any | *args | stuff to output | -| str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') | -| Tuple(str, str) | bar_color | color of a bar line | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high (Default value = DEFAULT_PROGRESS_BAR_SIZE) | -| int | border_width | width of border around element | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | no_titlebar | If True: no titlebar will be shown on the window | +| str | title | text to display in eleemnt | +| int | current_value | current value | +| int | max_value | max value of QuickMeter | +| str or int or tuple or object | key | Used to differentiate between mutliple meters. Used to cancel meter early. Now optional as there is a default value for single meters | +| Any | *args | stuff to output | +| str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') | +| Tuple(str, str) | bar_color | color of a bar line | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high (Default value = DEFAULT_PROGRESS_BAR_SIZE) | +| int | border_width | width of border around element | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | no_titlebar | If True: no titlebar will be shown on the window | | (bool) | **RETURN** | True if updated successfully. False if user closed the meter with the X or Cancel button Cancels and closes a previously created One Line Progress Meter window ``` -one_line_progress_meter_cancel(key="OK for 1 meter") +one_line_progress_meter_cancel(key = "OK for 1 meter") ``` Parameter Descriptions: @@ -11679,52 +12066,52 @@ Popup - Display a popup Window with as many parms as you wish to include. This ``` Popup(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - button_type=0, - auto_close=False, - auto_close_duration=None, - custom_text=(None, None), - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - any_key_closes=False, - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + button_type = 0, + auto_close = False, + auto_close_duration = None, + custom_text = (None, None), + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + any_key_closes = False, + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of your arguments. Load up the call with stuff to see! | -| str | title | Optional title for the window. If none provided, the first arg will be used instead. | -| Union[Tuple[str, str], None] | button_color | Color of the buttons shown (text color, button color) | -| str | background_color | Window's background color | -| str | text_color | text color | -| int | button_type | NOT USER SET! Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). There are many Popup functions and they call Popup, changing this parameter to get the desired effect. | -| bool | auto_close | If True the window will automatically close | -| int | auto_close_duration | time in seconds to keep window open before closing it automatically | -| Union[Tuple[str, str], str] | custom_text | A string or pair of strings that contain the text to display on the buttons | -| bool | non_blocking | If True then will immediately return from the function without waiting for the user's input. | -| Union[str, bytes] | icon | icon to display on the window. Same format as a Window call | -| int | line_width | Width of lines in characters. Defaults to MESSAGE_BOX_LINE_WIDTH | -| Union[str, tuple(font name, size, modifiers] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True will not show the frame around the window and the titlebar across the top | -| bool | grab_anywhere | If True can grab anywhere to move the window. If no_titlebar is True, grab_anywhere should likely be enabled too | -| Tuple[int, int] | location | Location on screen to display the top left corner of window. Defaults to window centered on screen | -| bool | keep_on_top | If True the window will remain above all current windows | -| bool | any_key_closes | If True then will turn on return_keyboard_events for the window which will cause window to close as soon as any key is pressed. Normally the return key only will close the window. Default is false. | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of your arguments. Load up the call with stuff to see! | +| str | title | Optional title for the window. If none provided, the first arg will be used instead. | +| Tuple[str, str] or None | button_color | Color of the buttons shown (text color, button color) | +| str | background_color | Window's background color | +| str | text_color | text color | +| int | button_type | NOT USER SET! Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). There are many Popup functions and they call Popup, changing this parameter to get the desired effect. | +| bool | auto_close | If True the window will automatically close | +| int | auto_close_duration | time in seconds to keep window open before closing it automatically | +| Tuple[str, str] or str | custom_text | A string or pair of strings that contain the text to display on the buttons | +| bool | non_blocking | If True then will immediately return from the function without waiting for the user's input. | +| str or bytes | icon | icon to display on the window. Same format as a Window call | +| int | line_width | Width of lines in characters. Defaults to MESSAGE_BOX_LINE_WIDTH | +| str or Tuple[font_name, size, modifiers] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True will not show the frame around the window and the titlebar across the top | +| bool | grab_anywhere | If True can grab anywhere to move the window. If no_titlebar is True, grab_anywhere should likely be enabled too | +| Tuple[int, int] | location | Location on screen to display the top left corner of window. Defaults to window centered on screen | +| bool | keep_on_top | If True the window will remain above all current windows | +| bool | any_key_closes | If True then will turn on return_keyboard_events for the window which will cause window to close as soon as any key is pressed. Normally the return key only will close the window. Default is false. | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Show animation one frame at a time. This function has its own internal clocking meaning you can call it at any frequency and the rate the frames of video is shown remains constant. Maybe your frames update every 30 ms but your @@ -11733,954 +12120,954 @@ Show animation one frame at a time. This function has its own internal clocking ``` PopupAnimated(image_source, - message=None, - background_color=None, - text_color=None, - font=None, - no_titlebar=True, - grab_anywhere=True, - keep_on_top=True, - location=(None, None), - alpha_channel=None, - time_between_frames=0, - transparent_color=None, - title="", - icon=None) + message = None, + background_color = None, + text_color = None, + font = None, + no_titlebar = True, + grab_anywhere = True, + keep_on_top = True, + location = (None, None), + alpha_channel = None, + time_between_frames = 0, + transparent_color = None, + title = "", + icon = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[str, bytes] | image_source | Either a filename or a base64 string. | -| str | message | An optional message to be shown with the animation | -| str | background_color | color of background | -| str | text_color | color of the text | -| Union[str, tuple] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True then the titlebar and window frame will not be shown | -| bool | grab_anywhere | If True then you can move the window just clicking anywhere on window, hold and drag | -| bool | keep_on_top | If True then Window will remain on top of all other windows currently shownn | -| (int, int) | location | (x,y) location on the screen to place the top left corner of your window. Default is to center on screen | -| float | alpha_channel | Window transparency 0 = invisible 1 = completely visible. Values between are see through | -| int | time_between_frames | Amount of time in milliseconds between each frame | -| str | transparent_color | This color will be completely see-through in your window. Can even click through | -| str | title | Title that will be shown on the window | -| str | icon | Same as Window icon parameter. Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | +| str or bytes | image_source | Either a filename or a base64 string. | +| str | message | An optional message to be shown with the animation | +| str | background_color | color of background | +| str | text_color | color of the text | +| str or tuple | font | specifies the font family, size, etc | +| bool | no_titlebar | If True then the titlebar and window frame will not be shown | +| bool | grab_anywhere | If True then you can move the window just clicking anywhere on window, hold and drag | +| bool | keep_on_top | If True then Window will remain on top of all other windows currently shownn | +| (int, int) | location | (x,y) location on the screen to place the top left corner of your window. Default is to center on screen | +| float | alpha_channel | Window transparency 0 = invisible 1 = completely visible. Values between are see through | +| int | time_between_frames | Amount of time in milliseconds between each frame | +| str | transparent_color | This color will be completely see-through in your window. Can even click through | +| str | title | Title that will be shown on the window | +| str | icon | Same as Window icon parameter. Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | | None | **RETURN** | No return value Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` PopupAnnoying(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - grab_anywhere=True, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + grab_anywhere = True, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Popup that closes itself after some time period ``` PopupAutoClose(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=True, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = True, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Display Popup with "cancelled" button text ``` PopupCancel(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Popup with colored button and 'Error' as button text ``` PopupError(args=*<1 or N object>, - title=None, - button_color=(None, None), - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_color = (None, None), + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Display popup window with text entry field and browse button so that a file can be chosen by user. ``` PopupGetFile(message, - title=None, - default_path="", - default_extension="", - save_as=False, - multiple_files=False, - file_types=(('ALL Files', '*.*'),), - no_window=False, - size=(None, None), - button_color=None, - background_color=None, - text_color=None, - icon=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - initial_folder=None, - image=None, - modal=True) + title = None, + default_path = "", + default_extension = "", + save_as = False, + multiple_files = False, + file_types = (('ALL Files', '*.*'),), + no_window = False, + size = (None, None), + button_color = None, + background_color = None, + text_color = None, + icon = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + initial_folder = None, + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | message | message displayed to user | -| str | title | Window title | -| str | default_path | path to display to user as starting point (filled into the input field) | -| str | default_extension | If no extension entered by user, add this to filename (only used in saveas dialogs) | -| bool | save_as | if True, the "save as" dialog is shown which will verify before overwriting | -| bool | multiple_files | if True, then allows multiple files to be selected that are returned with ';' between each filename | -| Tuple[Tuple[str,str]] | file_types | List of extensions to show using wildcards. All files (the default) = (("ALL Files", "*.*"),) | -| bool | no_window | if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown | -| (int, int) | size | (width, height) of the InputText Element | -| Tuple[str, str] or str | button_color | Color of the button (text, background) | -| str | background_color | background color of the entire window | -| str | text_color | color of the text | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str | initial_folder | location in filesystem to begin browsing | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None] | **RETURN** | string representing the file(s) chosen, None if cancelled or window closed with X +| str | message | message displayed to user | +| str | title | Window title | +| str | default_path | path to display to user as starting point (filled into the input field) | +| str | default_extension | If no extension entered by user, add this to filename (only used in saveas dialogs) | +| bool | save_as | if True, the "save as" dialog is shown which will verify before overwriting | +| bool | multiple_files | if True, then allows multiple files to be selected that are returned with ';' between each filename | +| Tuple[Tuple[str,str]] | file_types | List of extensions to show using wildcards. All files (the default) = (("ALL Files", "*.*"),) | +| bool | no_window | if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown | +| (int, int) | size | (width, height) of the InputText Element | +| Tuple[str, str] or str | button_color | Color of the button (text, background) | +| str | background_color | background color of the entire window | +| str | text_color | color of the text | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str | initial_folder | location in filesystem to begin browsing | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None | **RETURN** | string representing the file(s) chosen, None if cancelled or window closed with X Display popup with text entry field and browse button so that a folder can be chosen. ``` PopupGetFolder(message, - title=None, - default_path="", - no_window=False, - size=(None, None), - button_color=None, - background_color=None, - text_color=None, - icon=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - initial_folder=None, - image=None, - modal=True) + title = None, + default_path = "", + no_window = False, + size = (None, None), + button_color = None, + background_color = None, + text_color = None, + icon = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + initial_folder = None, + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | message | message displayed to user | -| str | title | Window title | -| str | default_path | path to display to user as starting point (filled into the input field) | -| bool | no_window | if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown | -| (int, int) | size | (width, height) of the InputText Element | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str | initial_folder | location in filesystem to begin browsing | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None] | **RETURN** | string representing the path chosen, None if cancelled or window closed with X +| str | message | message displayed to user | +| str | title | Window title | +| str | default_path | path to display to user as starting point (filled into the input field) | +| bool | no_window | if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown | +| (int, int) | size | (width, height) of the InputText Element | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str | initial_folder | location in filesystem to begin browsing | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None | **RETURN** | string representing the path chosen, None if cancelled or window closed with X Display Popup with text entry field. Returns the text entered or None if closed / cancelled ``` PopupGetText(message, - title=None, - default_text="", - password_char="", - size=(None, None), - button_color=None, - background_color=None, - text_color=None, - icon=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + default_text = "", + password_char = "", + size = (None, None), + button_color = None, + background_color = None, + text_color = None, + icon = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | message | message displayed to user | -| str | title | Window title | -| str | default_text | default value to put into input area | -| str | password_char | character to be shown instead of actually typed characters | -| (int, int) | size | (width, height) of the InputText Element | -| Tuple[str, str] or str | button_color | Color of the button (text, background) | -| str | background_color | background color of the entire window | -| str | text_color | color of the message text | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True can click and drag anywhere in the window to move the window | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | (x,y) Location on screen to display the upper left corner of window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None] | **RETURN** | Text entered or None if window was closed or cancel button clicked +| str | message | message displayed to user | +| str | title | Window title | +| str | default_text | default value to put into input area | +| str | password_char | character to be shown instead of actually typed characters | +| (int, int) | size | (width, height) of the InputText Element | +| Tuple[str, str] or str | button_color | Color of the button (text, background) | +| str | background_color | background color of the entire window | +| str | text_color | color of the message text | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True can click and drag anywhere in the window to move the window | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | (x,y) Location on screen to display the upper left corner of window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None | **RETURN** | Text entered or None if window was closed or cancel button clicked Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` PopupNoBorder(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - grab_anywhere=True, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + grab_anywhere = True, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Show a Popup but without any buttons ``` PopupNoButtons(args=*<1 or N object>, - title=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | If True then will immediately return from the function without waiting for the user's input. (Default = False) | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | If True then will immediately return from the function without waiting for the user's input. (Default = False) | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` PopupNoFrame(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - grab_anywhere=True, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + grab_anywhere = True, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` PopupNoTitlebar(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - grab_anywhere=True, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + grab_anywhere = True, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Show Popup window and immediately return (does not block) ``` PopupNoWait(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=True, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=False) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = True, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | -| Union[str, None] | **RETURN** | Reason for popup closing +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | +| str or None | **RETURN** | Reason for popup closing Show Popup window and immediately return (does not block) ``` PopupNonBlocking(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=True, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=False) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = True, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | -| Union[str, None] | **RETURN** | Reason for popup closing +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | +| str or None | **RETURN** | Reason for popup closing Display Popup with OK button only ``` PopupOK(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Display popup with OK and Cancel buttons ``` PopupOKCancel(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=..., - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = ..., + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union["OK", "Cancel", None] | **RETURN** | clicked button +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| "OK" or "Cancel" or None | **RETURN** | clicked button Show Popup box that doesn't block and closes itself ``` PopupQuick(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=True, - auto_close_duration=2, - non_blocking=True, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=False) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = True, + auto_close_duration = 2, + non_blocking = True, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Show Popup window with no titlebar, doesn't block, and auto closes itself. ``` PopupQuickMessage(args=*<1 or N object>, - title=None, - button_type=5, - button_color=None, - background_color=None, - text_color=None, - auto_close=True, - auto_close_duration=2, - non_blocking=True, - icon=None, - line_width=None, - font=None, - no_titlebar=True, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=False) + title = None, + button_type = 5, + button_color = None, + background_color = None, + text_color = None, + auto_close = True, + auto_close_duration = 2, + non_blocking = True, + icon = None, + line_width = None, + font = None, + no_titlebar = True, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | keep_on_top | If True the window will remain above all current windows | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | keep_on_top | If True the window will remain above all current windows | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Show a scrolled Popup window containing the user's text that was supplied. Use with as many items to print as you want, just like a print statement. ``` PopupScrolled(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - yes_no=False, - auto_close=False, - auto_close_duration=None, - size=(None, None), - location=(None, None), - non_blocking=False, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - font=None, - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + yes_no = False, + auto_close = False, + auto_close_duration = None, + size = (None, None), + location = (None, None), + non_blocking = False, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + font = None, + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | yes_no | If True, displays Yes and No buttons instead of Ok | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| Tuple[int, int] | location | Location on the screen to place the upper left corner of the window | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | yes_no | If True, displays Yes and No buttons instead of Ok | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| Tuple[int, int] | location | Location on the screen to place the upper left corner of the window | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Popup that closes itself after some time period ``` PopupTimed(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=True, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = True, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Display Popup with Yes and No buttons ``` PopupYesNo(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union["Yes", "No", None] | **RETURN** | clicked button +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| "Yes" or "No" or None | **RETURN** | clicked button ## Popups PEP8 Versions @@ -12689,52 +13076,52 @@ Popup - Display a popup Window with as many parms as you wish to include. This ``` popup(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - button_type=0, - auto_close=False, - auto_close_duration=None, - custom_text=(None, None), - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - any_key_closes=False, - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + button_type = 0, + auto_close = False, + auto_close_duration = None, + custom_text = (None, None), + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + any_key_closes = False, + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of your arguments. Load up the call with stuff to see! | -| str | title | Optional title for the window. If none provided, the first arg will be used instead. | -| Union[Tuple[str, str], None] | button_color | Color of the buttons shown (text color, button color) | -| str | background_color | Window's background color | -| str | text_color | text color | -| int | button_type | NOT USER SET! Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). There are many Popup functions and they call Popup, changing this parameter to get the desired effect. | -| bool | auto_close | If True the window will automatically close | -| int | auto_close_duration | time in seconds to keep window open before closing it automatically | -| Union[Tuple[str, str], str] | custom_text | A string or pair of strings that contain the text to display on the buttons | -| bool | non_blocking | If True then will immediately return from the function without waiting for the user's input. | -| Union[str, bytes] | icon | icon to display on the window. Same format as a Window call | -| int | line_width | Width of lines in characters. Defaults to MESSAGE_BOX_LINE_WIDTH | -| Union[str, tuple(font name, size, modifiers] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True will not show the frame around the window and the titlebar across the top | -| bool | grab_anywhere | If True can grab anywhere to move the window. If no_titlebar is True, grab_anywhere should likely be enabled too | -| Tuple[int, int] | location | Location on screen to display the top left corner of window. Defaults to window centered on screen | -| bool | keep_on_top | If True the window will remain above all current windows | -| bool | any_key_closes | If True then will turn on return_keyboard_events for the window which will cause window to close as soon as any key is pressed. Normally the return key only will close the window. Default is false. | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of your arguments. Load up the call with stuff to see! | +| str | title | Optional title for the window. If none provided, the first arg will be used instead. | +| Tuple[str, str] or None | button_color | Color of the buttons shown (text color, button color) | +| str | background_color | Window's background color | +| str | text_color | text color | +| int | button_type | NOT USER SET! Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). There are many Popup functions and they call Popup, changing this parameter to get the desired effect. | +| bool | auto_close | If True the window will automatically close | +| int | auto_close_duration | time in seconds to keep window open before closing it automatically | +| Tuple[str, str] or str | custom_text | A string or pair of strings that contain the text to display on the buttons | +| bool | non_blocking | If True then will immediately return from the function without waiting for the user's input. | +| str or bytes | icon | icon to display on the window. Same format as a Window call | +| int | line_width | Width of lines in characters. Defaults to MESSAGE_BOX_LINE_WIDTH | +| str or Tuple[font_name, size, modifiers] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True will not show the frame around the window and the titlebar across the top | +| bool | grab_anywhere | If True can grab anywhere to move the window. If no_titlebar is True, grab_anywhere should likely be enabled too | +| Tuple[int, int] | location | Location on screen to display the top left corner of window. Defaults to window centered on screen | +| bool | keep_on_top | If True the window will remain above all current windows | +| bool | any_key_closes | If True then will turn on return_keyboard_events for the window which will cause window to close as soon as any key is pressed. Normally the return key only will close the window. Default is false. | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Show animation one frame at a time. This function has its own internal clocking meaning you can call it at any frequency and the rate the frames of video is shown remains constant. Maybe your frames update every 30 ms but your @@ -12743,671 +13130,671 @@ Show animation one frame at a time. This function has its own internal clocking ``` popup_animated(image_source, - message=None, - background_color=None, - text_color=None, - font=None, - no_titlebar=True, - grab_anywhere=True, - keep_on_top=True, - location=(None, None), - alpha_channel=None, - time_between_frames=0, - transparent_color=None, - title="", - icon=None) + message = None, + background_color = None, + text_color = None, + font = None, + no_titlebar = True, + grab_anywhere = True, + keep_on_top = True, + location = (None, None), + alpha_channel = None, + time_between_frames = 0, + transparent_color = None, + title = "", + icon = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[str, bytes] | image_source | Either a filename or a base64 string. | -| str | message | An optional message to be shown with the animation | -| str | background_color | color of background | -| str | text_color | color of the text | -| Union[str, tuple] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True then the titlebar and window frame will not be shown | -| bool | grab_anywhere | If True then you can move the window just clicking anywhere on window, hold and drag | -| bool | keep_on_top | If True then Window will remain on top of all other windows currently shownn | -| (int, int) | location | (x,y) location on the screen to place the top left corner of your window. Default is to center on screen | -| float | alpha_channel | Window transparency 0 = invisible 1 = completely visible. Values between are see through | -| int | time_between_frames | Amount of time in milliseconds between each frame | -| str | transparent_color | This color will be completely see-through in your window. Can even click through | -| str | title | Title that will be shown on the window | -| str | icon | Same as Window icon parameter. Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | +| str or bytes | image_source | Either a filename or a base64 string. | +| str | message | An optional message to be shown with the animation | +| str | background_color | color of background | +| str | text_color | color of the text | +| str or tuple | font | specifies the font family, size, etc | +| bool | no_titlebar | If True then the titlebar and window frame will not be shown | +| bool | grab_anywhere | If True then you can move the window just clicking anywhere on window, hold and drag | +| bool | keep_on_top | If True then Window will remain on top of all other windows currently shownn | +| (int, int) | location | (x,y) location on the screen to place the top left corner of your window. Default is to center on screen | +| float | alpha_channel | Window transparency 0 = invisible 1 = completely visible. Values between are see through | +| int | time_between_frames | Amount of time in milliseconds between each frame | +| str | transparent_color | This color will be completely see-through in your window. Can even click through | +| str | title | Title that will be shown on the window | +| str | icon | Same as Window icon parameter. Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | | None | **RETURN** | No return value Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` popup_annoying(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - grab_anywhere=True, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + grab_anywhere = True, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Popup that closes itself after some time period ``` popup_auto_close(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=True, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = True, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Display Popup with "cancelled" button text ``` popup_cancel(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Popup with colored button and 'Error' as button text ``` popup_error(args=*<1 or N object>, - title=None, - button_color=(None, None), - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_color = (None, None), + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Display a calendar window, get the user's choice, return as a tuple (mon, day, year) ``` -popup_get_date(start_mon=None, - start_day=None, - start_year=None, - begin_at_sunday_plus=0, - no_titlebar=True, - title="Choose Date", - keep_on_top=True, - location=(None, None), - close_when_chosen=False, - icon=None, - locale=None, - month_names=None, - day_abbreviations=None, - modal=True) +popup_get_date(start_mon = None, + start_day = None, + start_year = None, + begin_at_sunday_plus = 0, + no_titlebar = True, + title = "Choose Date", + keep_on_top = True, + location = (None, None), + close_when_chosen = False, + icon = None, + locale = None, + month_names = None, + day_abbreviations = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| int | start_mon | The starting month | -| Union[int, None] | start_day | The starting day - optional. Set to None or 0 if no date to be chosen at start | -| int | start_year | The starting year | -| int | begin_at_sunday_plus | Determines the left-most day in the display. 0=sunday, 1=monday, etc | -| str | icon | Same as Window icon parameter. Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | -| (int, int) | location | (x,y) location on the screen to place the top left corner of your window. Default is to center on screen | -| str | title | Title that will be shown on the window | -| bool | close_when_chosen | MIKE_please_add_text_here | -| str | locale | locale used to get the day names | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | keep_on_top | If True the window will remain above all current windows | -| List[str] | month_names | optional list of month names to use (should be 12 items) | -| List[str] | day_abbreviations | optional list of abbreviations to display as the day of week | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| int | start_mon | The starting month | +| int or None | start_day | The starting day - optional. Set to None or 0 if no date to be chosen at start | +| int | start_year | The starting year | +| int | begin_at_sunday_plus | Determines the left-most day in the display. 0=sunday, 1=monday, etc | +| str | icon | Same as Window icon parameter. Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | +| (int, int) | location | (x,y) location on the screen to place the top left corner of your window. Default is to center on screen | +| str | title | Title that will be shown on the window | +| bool | close_when_chosen | MIKE_please_add_text_here | +| str | locale | locale used to get the day names | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | keep_on_top | If True the window will remain above all current windows | +| List[str] | month_names | optional list of month names to use (should be 12 items) | +| List[str] | day_abbreviations | optional list of abbreviations to display as the day of week | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | | None or (int, int, int) | **RETURN** | Tuple containing (month, day, year) of chosen date or None if was cancelled Display popup window with text entry field and browse button so that a file can be chosen by user. ``` popup_get_file(message, - title=None, - default_path="", - default_extension="", - save_as=False, - multiple_files=False, - file_types=(('ALL Files', '*.*'),), - no_window=False, - size=(None, None), - button_color=None, - background_color=None, - text_color=None, - icon=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - initial_folder=None, - image=None, - modal=True) + title = None, + default_path = "", + default_extension = "", + save_as = False, + multiple_files = False, + file_types = (('ALL Files', '*.*'),), + no_window = False, + size = (None, None), + button_color = None, + background_color = None, + text_color = None, + icon = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + initial_folder = None, + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | message | message displayed to user | -| str | title | Window title | -| str | default_path | path to display to user as starting point (filled into the input field) | -| str | default_extension | If no extension entered by user, add this to filename (only used in saveas dialogs) | -| bool | save_as | if True, the "save as" dialog is shown which will verify before overwriting | -| bool | multiple_files | if True, then allows multiple files to be selected that are returned with ';' between each filename | -| Tuple[Tuple[str,str]] | file_types | List of extensions to show using wildcards. All files (the default) = (("ALL Files", "*.*"),) | -| bool | no_window | if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown | -| (int, int) | size | (width, height) of the InputText Element | -| Tuple[str, str] or str | button_color | Color of the button (text, background) | -| str | background_color | background color of the entire window | -| str | text_color | color of the text | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str | initial_folder | location in filesystem to begin browsing | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None] | **RETURN** | string representing the file(s) chosen, None if cancelled or window closed with X +| str | message | message displayed to user | +| str | title | Window title | +| str | default_path | path to display to user as starting point (filled into the input field) | +| str | default_extension | If no extension entered by user, add this to filename (only used in saveas dialogs) | +| bool | save_as | if True, the "save as" dialog is shown which will verify before overwriting | +| bool | multiple_files | if True, then allows multiple files to be selected that are returned with ';' between each filename | +| Tuple[Tuple[str,str]] | file_types | List of extensions to show using wildcards. All files (the default) = (("ALL Files", "*.*"),) | +| bool | no_window | if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown | +| (int, int) | size | (width, height) of the InputText Element | +| Tuple[str, str] or str | button_color | Color of the button (text, background) | +| str | background_color | background color of the entire window | +| str | text_color | color of the text | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str | initial_folder | location in filesystem to begin browsing | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None | **RETURN** | string representing the file(s) chosen, None if cancelled or window closed with X Display popup with text entry field and browse button so that a folder can be chosen. ``` popup_get_folder(message, - title=None, - default_path="", - no_window=False, - size=(None, None), - button_color=None, - background_color=None, - text_color=None, - icon=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - initial_folder=None, - image=None, - modal=True) + title = None, + default_path = "", + no_window = False, + size = (None, None), + button_color = None, + background_color = None, + text_color = None, + icon = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + initial_folder = None, + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | message | message displayed to user | -| str | title | Window title | -| str | default_path | path to display to user as starting point (filled into the input field) | -| bool | no_window | if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown | -| (int, int) | size | (width, height) of the InputText Element | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str | initial_folder | location in filesystem to begin browsing | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None] | **RETURN** | string representing the path chosen, None if cancelled or window closed with X +| str | message | message displayed to user | +| str | title | Window title | +| str | default_path | path to display to user as starting point (filled into the input field) | +| bool | no_window | if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown | +| (int, int) | size | (width, height) of the InputText Element | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str | initial_folder | location in filesystem to begin browsing | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None | **RETURN** | string representing the path chosen, None if cancelled or window closed with X Display Popup with text entry field. Returns the text entered or None if closed / cancelled ``` popup_get_text(message, - title=None, - default_text="", - password_char="", - size=(None, None), - button_color=None, - background_color=None, - text_color=None, - icon=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + default_text = "", + password_char = "", + size = (None, None), + button_color = None, + background_color = None, + text_color = None, + icon = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | message | message displayed to user | -| str | title | Window title | -| str | default_text | default value to put into input area | -| str | password_char | character to be shown instead of actually typed characters | -| (int, int) | size | (width, height) of the InputText Element | -| Tuple[str, str] or str | button_color | Color of the button (text, background) | -| str | background_color | background color of the entire window | -| str | text_color | color of the message text | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True can click and drag anywhere in the window to move the window | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | (x,y) Location on screen to display the upper left corner of window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None] | **RETURN** | Text entered or None if window was closed or cancel button clicked +| str | message | message displayed to user | +| str | title | Window title | +| str | default_text | default value to put into input area | +| str | password_char | character to be shown instead of actually typed characters | +| (int, int) | size | (width, height) of the InputText Element | +| Tuple[str, str] or str | button_color | Color of the button (text, background) | +| str | background_color | background color of the entire window | +| str | text_color | color of the message text | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True can click and drag anywhere in the window to move the window | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | (x,y) Location on screen to display the upper left corner of window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None | **RETURN** | Text entered or None if window was closed or cancel button clicked Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` popup_no_border(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - grab_anywhere=True, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + grab_anywhere = True, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Show a Popup but without any buttons ``` popup_no_buttons(args=*<1 or N object>, - title=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | If True then will immediately return from the function without waiting for the user's input. (Default = False) | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | If True then will immediately return from the function without waiting for the user's input. (Default = False) | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` popup_no_frame(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - grab_anywhere=True, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + grab_anywhere = True, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Display a Popup without a titlebar. Enables grab anywhere so you can move it ``` popup_no_titlebar(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - grab_anywhere=True, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + grab_anywhere = True, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Show Popup window and immediately return (does not block) ``` popup_no_wait(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=True, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=False) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = True, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | -| Union[str, None] | **RETURN** | Reason for popup closing +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | +| str or None | **RETURN** | Reason for popup closing Show Popup window and immediately return (does not block) ``` popup_non_blocking(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=True, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=False) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = True, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | -| Union[str, None] | **RETURN** | Reason for popup closing +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | +| str or None | **RETURN** | Reason for popup closing Displays a "notification window", usually in the bottom right corner of your display. Has an icon, a title, and a message. It is more like a "toaster" window than the normal popups. @@ -13417,348 +13804,348 @@ The return code specifies why the call is returning (e.g. did the user click the ``` popup_notify(args=*<1 or N object>, - title="", - icon=..., - display_duration_in_ms=3000, - fade_in_duration=1000, - alpha=0.9, - location=None) + title = "", + icon = ..., + display_duration_in_ms = 3000, + fade_in_duration = 1000, + alpha = 0.9, + location = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | title | Text to be shown at the top of the window in a larger font | -| str | message | Text message that makes up the majority of the window | -| Union[bytes, str] | icon | A base64 encoded PNG/GIF image or PNG/GIF filename that will be displayed in the window | -| int | display_duration_in_ms | Number of milliseconds to show the window | -| int | fade_in_duration | Number of milliseconds to fade window in and out | -| float | alpha | Alpha channel. 0 - invisible 1 - fully visible | -| Tuple[int, int] | location | Location on the screen to display the window | +| str | title | Text to be shown at the top of the window in a larger font | +| str | message | Text message that makes up the majority of the window | +| bytes or str | icon | A base64 encoded PNG/GIF image or PNG/GIF filename that will be displayed in the window | +| int | display_duration_in_ms | Number of milliseconds to show the window | +| int | fade_in_duration | Number of milliseconds to fade window in and out | +| float | alpha | Alpha channel. 0 - invisible 1 - fully visible | +| Tuple[int, int] | location | Location on the screen to display the window | | (int) | **RETURN** | reason for returning Display Popup with OK button only ``` popup_ok(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Display popup with OK and Cancel buttons ``` popup_ok_cancel(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=..., - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = ..., + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union["OK", "Cancel", None] | **RETURN** | clicked button +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| "OK" or "Cancel" or None | **RETURN** | clicked button Show Popup box that doesn't block and closes itself ``` popup_quick(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=True, - auto_close_duration=2, - non_blocking=True, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=False) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = True, + auto_close_duration = 2, + non_blocking = True, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Show Popup window with no titlebar, doesn't block, and auto closes itself. ``` popup_quick_message(args=*<1 or N object>, - title=None, - button_type=5, - button_color=None, - background_color=None, - text_color=None, - auto_close=True, - auto_close_duration=2, - non_blocking=True, - icon=None, - line_width=None, - font=None, - no_titlebar=True, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=False) + title = None, + button_type = 5, + button_color = None, + background_color = None, + text_color = None, + auto_close = True, + auto_close_duration = 2, + non_blocking = True, + icon = None, + line_width = None, + font = None, + no_titlebar = True, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | keep_on_top | If True the window will remain above all current windows | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | keep_on_top | If True the window will remain above all current windows | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Show a scrolled Popup window containing the user's text that was supplied. Use with as many items to print as you want, just like a print statement. ``` popup_scrolled(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - yes_no=False, - auto_close=False, - auto_close_duration=None, - size=(None, None), - location=(None, None), - non_blocking=False, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - font=None, - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + yes_no = False, + auto_close = False, + auto_close_duration = None, + size = (None, None), + location = (None, None), + non_blocking = False, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + font = None, + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | yes_no | If True, displays Yes and No buttons instead of Ok | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| Tuple[int, int] | location | Location on the screen to place the upper left corner of the window | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | yes_no | If True, displays Yes and No buttons instead of Ok | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| Tuple[int, int] | location | Location on the screen to place the upper left corner of the window | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Popup that closes itself after some time period ``` popup_timed(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=True, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = True, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Display Popup with Yes and No buttons ``` popup_yes_no(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union["Yes", "No", None] | **RETURN** | clicked button +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| "Yes" or "No" or None | **RETURN** | clicked button Same as popup_scrolled @@ -13767,99 +14154,99 @@ want, just like a print statement. ``` sprint(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - yes_no=False, - auto_close=False, - auto_close_duration=None, - size=(None, None), - location=(None, None), - non_blocking=False, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - font=None, - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + yes_no = False, + auto_close = False, + auto_close_duration = None, + size = (None, None), + location = (None, None), + non_blocking = False, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + font = None, + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | yes_no | If True, displays Yes and No buttons instead of Ok | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| Tuple[int, int] | location | Location on the screen to place the upper left corner of the window | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | yes_no | If True, displays Yes and No buttons instead of Ok | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| Tuple[int, int] | location | Location on the screen to place the upper left corner of the window | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Show a scrolled Popup window containing the user's text that was supplied. Use with as many items to print as you want, just like a print statement. ``` ScrolledTextBox(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - yes_no=False, - auto_close=False, - auto_close_duration=None, - size=(None, None), - location=(None, None), - non_blocking=False, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - font=None, - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + yes_no = False, + auto_close = False, + auto_close_duration = None, + size = (None, None), + location = (None, None), + non_blocking = False, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + font = None, + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | yes_no | If True, displays Yes and No buttons instead of Ok | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| Tuple[int, int] | location | Location on the screen to place the upper left corner of the window | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | yes_no | If True, displays Yes and No buttons instead of Ok | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| Tuple[int, int] | location | Location on the screen to place the upper left corner of the window | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X ## PEP8 Function Bindings Dumps an Object's values as a formatted string. Very nicely done. Great way to display an object's member variables in human form ``` -obj_to_string(obj, extra=" ") +obj_to_string(obj, extra = " ") ``` Parameter Descriptions: @@ -13897,58 +14284,63 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[bytes, str] | icon | Either a Base64 byte string or a filename | +| bytes or str | icon | Either a Base64 byte string or a filename | | None | **RETURN** | None ``` -SetOptions(icon=None, - button_color=None, - element_size=(None, None), - button_element_size=(None, None), - margins=(None, None), - element_padding=(None, None), - auto_size_text=None, - auto_size_buttons=None, - font=None, - border_width=None, - slider_border_width=None, - slider_relief=None, - slider_orientation=None, - autoclose_time=None, - message_box_line_width=None, - progress_meter_border_depth=None, - progress_meter_style=None, - progress_meter_relief=None, - progress_meter_color=None, - progress_meter_size=None, - text_justification=None, - background_color=None, - element_background_color=None, - text_element_background_color=None, - input_elements_background_color=None, - input_text_color=None, - scrollbar_color=None, - text_color=None, - element_text_color=None, - debug_win_size=(None, None), - window_location=(None, None), - error_button_color=(None, None), - tooltip_time=None, - tooltip_font=None, - use_ttk_buttons=None, - ttk_theme=None, - suppress_error_popups=None, - suppress_raise_key_errors=None, - suppress_key_guessing=None, - enable_treeview_869_patch=None, - enable_mac_notitlebar_patch=None) +SetOptions(icon = None, + button_color = None, + element_size = (None, None), + button_element_size = (None, None), + margins = (None, None), + element_padding = (None, None), + auto_size_text = None, + auto_size_buttons = None, + font = None, + border_width = None, + slider_border_width = None, + slider_relief = None, + slider_orientation = None, + autoclose_time = None, + message_box_line_width = None, + progress_meter_border_depth = None, + progress_meter_style = None, + progress_meter_relief = None, + progress_meter_color = None, + progress_meter_size = None, + text_justification = None, + background_color = None, + element_background_color = None, + text_element_background_color = None, + input_elements_background_color = None, + input_text_color = None, + scrollbar_color = None, + text_color = None, + element_text_color = None, + debug_win_size = (None, None), + window_location = (None, None), + error_button_color = (None, None), + tooltip_time = None, + tooltip_font = None, + use_ttk_buttons = None, + ttk_theme = None, + suppress_error_popups = None, + suppress_raise_key_errors = None, + suppress_key_guessing = None, + enable_treeview_869_patch = None, + enable_mac_notitlebar_patch = None, + use_custom_titlebar = None, + titlebar_background_color = None, + titlebar_text_color = None, + titlebar_font = None, + titlebar_icon = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | +| bytes or str | icon | filename or base64 string to be used for the window's icon | | Tuple[str, str] or str | button_color | Color of the button (text, background) | | (int, int) | element_size | element size (width, height) in characters | | (int, int) | button_element_size | Size of button | @@ -13956,7 +14348,7 @@ Parameter Descriptions: | Tuple[int, int] or ((int, int),(int,int)) | element_padding | Default amount of padding to put around elements in window (left/right, top/bottom) or ((left, right), (top, bottom)) | | bool | auto_size_text | True if the Widget should be shrunk to exactly fit the number of chars to show | | bool | auto_size_buttons | True if Buttons in this Window should be sized to exactly fit the text on this. | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | +| str or Tuple[str, int] | font | specifies the font family, size, etc | | int | border_width | width of border around element | | ??? | slider_border_width | ??? | | ??? | slider_relief | ??? | @@ -13968,7 +14360,7 @@ Parameter Descriptions: | ??? | progress_meter_relief | | | ??? | progress_meter_color | ??? | | ??? | progress_meter_size | ??? | -| Union['left', 'right', 'center'] | text_justification | Default text justification for all Text Elements in window | +| 'left' or 'right' or 'center' | text_justification | Default text justification for all Text Elements in window | | str | background_color | color of background | | str | element_background_color | element background color | | str | text_element_background_color | text element background color | @@ -13989,6 +14381,11 @@ Parameter Descriptions: | bool | suppress_key_guessing | If True then key errors won't try and find closest matches for you | | bool | enable_treeview_869_patch | If True, then will use the treeview color patch for tk 8.6.9 | | bool | enable_mac_notitlebar_patch | If True then Windows with no titlebar use an alternative technique when tkinter version < 8.6.10 | +| bool | use_custom_titlebar | If True then a custom titlebar is used instead of the normal system titlebar | +| str or None | titlebar_background_color | If custom titlebar indicated by use_custom_titlebar, then use this as background color | +| str or None | titlebar_text_color | If custom titlebar indicated by use_custom_titlebar, then use this as text color | +| str or Tuple[str, int] or None | titlebar_font | If custom titlebar indicated by use_custom_titlebar, then use this as title font | +| bytes or str | titlebar_icon | If custom titlebar indicated by use_custom_titlebar, then use this as the icon (file or base64 bytes) | | None | **RETURN** | None ## The Test Harness @@ -14018,7 +14415,7 @@ test() Shows the smaller "popout" window. Default location is the upper right corner of your screen ``` -show_debugger_popout_window(location=(None, None), args=*<1 or N object>) +show_debugger_popout_window(location = (None, None), args=*<1 or N object>) ``` Parameter Descriptions: @@ -14031,7 +14428,7 @@ Parameter Descriptions: Shows the large main debugger window ``` -show_debugger_window(location=(None, None), args=*<1 or N object>) +show_debugger_window(location = (None, None), args=*<1 or N object>) ``` Parameter Descriptions: @@ -14047,7 +14444,7 @@ Sets / Gets the current Theme. If none is specified then returns the current th This call replaces the ChangeLookAndFeel / change_look_and_feel call which only sets the theme. ``` -theme(new_theme=None) +theme(new_theme = None) ``` Parameter Descriptions: @@ -14074,7 +14471,7 @@ Sets/Returns the background color currently in use Used for Windows and containers (Column, Frame, Tab) and tables ``` -theme_background_color(color=None) +theme_background_color(color = None) ``` Parameter Descriptions: @@ -14088,7 +14485,7 @@ Sets/Returns the border width currently in use Used by non ttk elements at the moment ``` -theme_border_width(border_width=None) +theme_border_width(border_width = None) ``` Parameter Descriptions: @@ -14100,7 +14497,7 @@ Parameter Descriptions: Sets/Returns the button color currently in use ``` -theme_button_color(color=None) +theme_button_color(color = None) ``` Parameter Descriptions: @@ -14112,7 +14509,7 @@ Parameter Descriptions: Sets/Returns the background color currently in use for all elements except containers ``` -theme_element_background_color(color=None) +theme_element_background_color(color = None) ``` Parameter Descriptions: @@ -14124,7 +14521,7 @@ Parameter Descriptions: Sets/Returns the text color used by elements that have text as part of their display (Tables, Trees and Sliders) ``` -theme_element_text_color(color=None) +theme_element_text_color(color = None) ``` Parameter Descriptions: @@ -14136,7 +14533,7 @@ Parameter Descriptions: Sets/Returns the input element background color currently in use ``` -theme_input_background_color(color=None) +theme_input_background_color(color = None) ``` Parameter Descriptions: @@ -14148,7 +14545,7 @@ Parameter Descriptions: Sets/Returns the input element entry color (not the text but the thing that's displaying the text) ``` -theme_input_text_color(color=None) +theme_input_text_color(color = None) ``` Parameter Descriptions: @@ -14173,11 +14570,11 @@ Displays a "Quick Reference Window" showing all of the different Look and Feel s They are sorted alphabetically. The legacy color names are mixed in, but otherwise they are sorted into Dark and Light halves ``` -theme_previewer(columns=12, - scrollable=False, - scroll_area_size=(None, None), - search_string=None, - location=(None, None)) +theme_previewer(columns = 12, + scrollable = False, + scroll_area_size = (None, None), + search_string = None, + location = (None, None)) ``` Parameter Descriptions: @@ -14201,7 +14598,7 @@ theme_previewer_swatches() Sets/Returns the progress meter border width currently in use ``` -theme_progress_bar_border_width(border_width=None) +theme_progress_bar_border_width(border_width = None) ``` Parameter Descriptions: @@ -14213,7 +14610,7 @@ Parameter Descriptions: Sets/Returns the progress bar colors by the current color theme ``` -theme_progress_bar_color(color=None) +theme_progress_bar_color(color = None) ``` Parameter Descriptions: @@ -14225,7 +14622,7 @@ Parameter Descriptions: Sets/Returns the slider border width currently in use ``` -theme_slider_border_width(border_width=None) +theme_slider_border_width(border_width = None) ``` Parameter Descriptions: @@ -14237,7 +14634,7 @@ Parameter Descriptions: Sets/Returns the slider color (used for sliders) ``` -theme_slider_color(color=None) +theme_slider_color(color = None) ``` Parameter Descriptions: @@ -14249,7 +14646,7 @@ Parameter Descriptions: Sets/Returns the text color currently in use ``` -theme_text_color(color=None) +theme_text_color(color = None) ``` Parameter Descriptions: @@ -14261,7 +14658,7 @@ Parameter Descriptions: Sets/Returns the background color for text elements ``` -theme_text_element_background_color(color=None) +theme_text_element_background_color(color = None) ``` Parameter Descriptions: @@ -14306,7 +14703,7 @@ If you don't choose a filename, your application's filename + '.json' will be us Also sets your current dictionary to a blank one. ``` -user_settings_delete_filename(filename=None, path=None) +user_settings_delete_filename(filename = None, path = None) ``` Parameter Descriptions: @@ -14321,7 +14718,7 @@ If either a filename or a path is not included, then the appropriate default will be used. ``` -user_settings_file_exists(filename=None, path=None) +user_settings_file_exists(filename = None, path = None) ``` Parameter Descriptions: @@ -14343,7 +14740,7 @@ Normally the filename and path are split in the user_settings calls. However for can be combined so that the filename contains both the path and filename. ``` -user_settings_filename(filename=None, path=None) +user_settings_filename(filename = None, path = None) ``` Parameter Descriptions: @@ -14361,7 +14758,7 @@ If no filename has been specified up to this point, then a default filename will The settings are SAVED prior to returning. ``` -user_settings_get_entry(key, default=None) +user_settings_get_entry(key, default = None) ``` Parameter Descriptions: @@ -14377,7 +14774,7 @@ The filename can be a full filename including a path, or the path can be specifi If no filename is specified, then the caller's filename will be used with the extension ".json" ``` -user_settings_load(filename=None, path=None) +user_settings_load(filename = None, path = None) ``` Parameter Descriptions: @@ -14392,7 +14789,7 @@ Saves the current settings dictionary. If a filename or path is specified in th previously specitfied filename to create a new settings file. The settings dictionary is then saved to the newly defined file. ``` -user_settings_save(filename=None, path=None) +user_settings_save(filename = None, path = None) ``` Parameter Descriptions: @@ -14421,7 +14818,7 @@ Parameter Descriptions: Used to control the display of error messages. By default, error messages are displayed to stdout. ``` -user_settings_silent_on_error(silent_on_error=False) +user_settings_silent_on_error(silent_on_error = False) ``` Parameter Descriptions: @@ -14454,8 +14851,8 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Window | window | The window object to fill | -| (Dict[Any:Any]) | values_dict | A dictionary with element keys as key and value is values parm for Update call | +| Window | window | The window object to fill | +| (Dict[Any, Any]) | values_dict | A dictionary with element keys as key and value is values parm for Update call | | None | **RETURN** | None Fills a window with values provided in a values dictionary { element_key : new_value } @@ -14468,8 +14865,8 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Window | window | The window object to fill | -| (Dict[Any:Any]) | values_dict | A dictionary with element keys as key and value is values parm for Update call | +| Window | window | The window object to fill | +| (Dict[Any, Any]) | values_dict | A dictionary with element keys as key and value is values parm for Update call | | None | **RETURN** | None ## Layout Helper Funcs @@ -14479,17 +14876,19 @@ Pin's an element provided into a layout so that when it's made invisible and vis ``` pin(elem, - vertical_alignment=None, - shrink=True) + vertical_alignment = None, + shrink = True, + expand_x = None, + expand_y = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Element | elem | the element to put into the layout | -| Union[str, None] | vertical_alignment | Aligns elements vertically. 'top', 'center', 'bottom'. Can be shortened to 't', 'c', 'b' | -| bool | shrink | If True, then the space will shrink down to a single pixel when hidden. False leaves the area large and blank | +| Element | elem | the element to put into the layout | +| str or None | vertical_alignment | Aligns elements vertically. 'top', 'center', 'bottom'. Can be shortened to 't', 'c', 'b' | +| bool | shrink | If True, then the space will shrink down to a single pixel when hidden. False leaves the area large and blank | | Column | **RETURN** | A column element containing the provided element Align an element or a row of elements to the bottom of the row that contains it @@ -14502,8 +14901,8 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[Element, List[Element], Tuple[Element]] | elem_or_row | the element or row of elements | -| Union[Column, List[Column]] | **RETURN** | A column element containing the provided element aligned to the bottom or list of elements (a row) +| Element or List[Element] or Tuple[Element] | elem_or_row | the element or row of elements | +| Column or List[Column] | **RETURN** | A column element containing the provided element aligned to the bottom or list of elements (a row) Align an element or a row of elements to the center of the row that contains it @@ -14515,8 +14914,8 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[Element, List[Element], Tuple[Element]] | elem_or_row | the element or row of elements | -| Union[Column, List[Column]] | **RETURN** | A column element containing the provided element aligned to the center or list of elements (a row) +| Element or List[Element] or Tuple[Element] | elem_or_row | the element or row of elements | +| Column or List[Column] | **RETURN** | A column element containing the provided element aligned to the center or list of elements (a row) Align an element or a row of elements to the top of the row that contains it @@ -14528,23 +14927,11 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[Element, List[Element], Tuple[Element]] | elem_or_row | the element or row of elements | -| Union[Column, List[Column]] | **RETURN** | A column element containing the provided element aligned to the top or list of elements (a row) +| Element or List[Element] or Tuple[Element] | elem_or_row | the element or row of elements | +| Column or List[Column] | **RETURN** | A column element containing the provided element aligned to the top or list of elements (a row) ## Configuration / Settings / Extensions -Returns the dictionary of the global variables - -``` -get_globals() -``` - -Parameter Descriptions: - -|Type|Name|Meaning| -|--|--|--| -| Dict[str, Any] | **RETURN** | the gobals dictionary - Sets the icon which will be used any time a window is created if an icon is not provided when the window is created. @@ -14556,58 +14943,63 @@ Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[bytes, str] | icon | Either a Base64 byte string or a filename | +| bytes or str | icon | Either a Base64 byte string or a filename | | None | **RETURN** | None ``` -set_options(icon=None, - button_color=None, - element_size=(None, None), - button_element_size=(None, None), - margins=(None, None), - element_padding=(None, None), - auto_size_text=None, - auto_size_buttons=None, - font=None, - border_width=None, - slider_border_width=None, - slider_relief=None, - slider_orientation=None, - autoclose_time=None, - message_box_line_width=None, - progress_meter_border_depth=None, - progress_meter_style=None, - progress_meter_relief=None, - progress_meter_color=None, - progress_meter_size=None, - text_justification=None, - background_color=None, - element_background_color=None, - text_element_background_color=None, - input_elements_background_color=None, - input_text_color=None, - scrollbar_color=None, - text_color=None, - element_text_color=None, - debug_win_size=(None, None), - window_location=(None, None), - error_button_color=(None, None), - tooltip_time=None, - tooltip_font=None, - use_ttk_buttons=None, - ttk_theme=None, - suppress_error_popups=None, - suppress_raise_key_errors=None, - suppress_key_guessing=None, - enable_treeview_869_patch=None, - enable_mac_notitlebar_patch=None) +set_options(icon = None, + button_color = None, + element_size = (None, None), + button_element_size = (None, None), + margins = (None, None), + element_padding = (None, None), + auto_size_text = None, + auto_size_buttons = None, + font = None, + border_width = None, + slider_border_width = None, + slider_relief = None, + slider_orientation = None, + autoclose_time = None, + message_box_line_width = None, + progress_meter_border_depth = None, + progress_meter_style = None, + progress_meter_relief = None, + progress_meter_color = None, + progress_meter_size = None, + text_justification = None, + background_color = None, + element_background_color = None, + text_element_background_color = None, + input_elements_background_color = None, + input_text_color = None, + scrollbar_color = None, + text_color = None, + element_text_color = None, + debug_win_size = (None, None), + window_location = (None, None), + error_button_color = (None, None), + tooltip_time = None, + tooltip_font = None, + use_ttk_buttons = None, + ttk_theme = None, + suppress_error_popups = None, + suppress_raise_key_errors = None, + suppress_key_guessing = None, + enable_treeview_869_patch = None, + enable_mac_notitlebar_patch = None, + use_custom_titlebar = None, + titlebar_background_color = None, + titlebar_text_color = None, + titlebar_font = None, + titlebar_icon = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | +| bytes or str | icon | filename or base64 string to be used for the window's icon | | Tuple[str, str] or str | button_color | Color of the button (text, background) | | (int, int) | element_size | element size (width, height) in characters | | (int, int) | button_element_size | Size of button | @@ -14615,7 +15007,7 @@ Parameter Descriptions: | Tuple[int, int] or ((int, int),(int,int)) | element_padding | Default amount of padding to put around elements in window (left/right, top/bottom) or ((left, right), (top, bottom)) | | bool | auto_size_text | True if the Widget should be shrunk to exactly fit the number of chars to show | | bool | auto_size_buttons | True if Buttons in this Window should be sized to exactly fit the text on this. | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | +| str or Tuple[str, int] | font | specifies the font family, size, etc | | int | border_width | width of border around element | | ??? | slider_border_width | ??? | | ??? | slider_relief | ??? | @@ -14627,7 +15019,7 @@ Parameter Descriptions: | ??? | progress_meter_relief | | | ??? | progress_meter_color | ??? | | ??? | progress_meter_size | ??? | -| Union['left', 'right', 'center'] | text_justification | Default text justification for all Text Elements in window | +| 'left' or 'right' or 'center' | text_justification | Default text justification for all Text Elements in window | | str | background_color | color of background | | str | element_background_color | element background color | | str | text_element_background_color | text element background color | @@ -14648,6 +15040,11 @@ Parameter Descriptions: | bool | suppress_key_guessing | If True then key errors won't try and find closest matches for you | | bool | enable_treeview_869_patch | If True, then will use the treeview color patch for tk 8.6.9 | | bool | enable_mac_notitlebar_patch | If True then Windows with no titlebar use an alternative technique when tkinter version < 8.6.10 | +| bool | use_custom_titlebar | If True then a custom titlebar is used instead of the normal system titlebar | +| str or None | titlebar_background_color | If custom titlebar indicated by use_custom_titlebar, then use this as background color | +| str or None | titlebar_text_color | If custom titlebar indicated by use_custom_titlebar, then use this as text color | +| str or Tuple[str, int] or None | titlebar_font | If custom titlebar indicated by use_custom_titlebar, then use this as title font | +| bytes or str | titlebar_icon | If custom titlebar indicated by use_custom_titlebar, then use this as the icon (file or base64 bytes) | | None | **RETURN** | None ## Old Themes (Look and Feel) - Replaced by theme() @@ -14666,7 +15063,7 @@ Default = The default settings (only button color is different than system defau Default1 = The full system default including the button (everything's gray... how sad... don't be all gray... please....) ``` -ChangeLookAndFeel(index, force=False) +ChangeLookAndFeel(index, force = False) ``` Parameter Descriptions: @@ -14693,11 +15090,11 @@ Displays a "Quick Reference Window" showing all of the different Look and Feel s They are sorted alphabetically. The legacy color names are mixed in, but otherwise they are sorted into Dark and Light halves ``` -preview_all_look_and_feel_themes(columns=12, - scrollable=False, - scroll_area_size=(None, None), - search_string=None, - location=(None, None)) +preview_all_look_and_feel_themes(columns = 12, + scrollable = False, + scroll_area_size = (None, None), + search_string = None, + location = (None, None)) ``` Parameter Descriptions: @@ -14736,7 +15133,7 @@ Default = The default settings (only button color is different than system defau Default1 = The full system default including the button (everything's gray... how sad... don't be all gray... please....) ``` -change_look_and_feel(index, force=False) +change_look_and_feel(index, force = False) ``` Parameter Descriptions: diff --git a/docs/index.md b/docs/index.md index dd1ec9c0..88364ca9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1434,52 +1434,52 @@ Popup - Display a popup Window with as many parms as you wish to include. This ``` Popup(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - button_type=0, - auto_close=False, - auto_close_duration=None, - custom_text=(None, None), - non_blocking=False, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - any_key_closes=False, - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + button_type = 0, + auto_close = False, + auto_close_duration = None, + custom_text = (None, None), + non_blocking = False, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + any_key_closes = False, + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of your arguments. Load up the call with stuff to see! | -| str | title | Optional title for the window. If none provided, the first arg will be used instead. | -| Union[Tuple[str, str], None] | button_color | Color of the buttons shown (text color, button color) | -| str | background_color | Window's background color | -| str | text_color | text color | -| int | button_type | NOT USER SET! Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). There are many Popup functions and they call Popup, changing this parameter to get the desired effect. | -| bool | auto_close | If True the window will automatically close | -| int | auto_close_duration | time in seconds to keep window open before closing it automatically | -| Union[Tuple[str, str], str] | custom_text | A string or pair of strings that contain the text to display on the buttons | -| bool | non_blocking | If True then will immediately return from the function without waiting for the user's input. | -| Union[str, bytes] | icon | icon to display on the window. Same format as a Window call | -| int | line_width | Width of lines in characters. Defaults to MESSAGE_BOX_LINE_WIDTH | -| Union[str, tuple(font name, size, modifiers] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True will not show the frame around the window and the titlebar across the top | -| bool | grab_anywhere | If True can grab anywhere to move the window. If no_titlebar is True, grab_anywhere should likely be enabled too | -| Tuple[int, int] | location | Location on screen to display the top left corner of window. Defaults to window centered on screen | -| bool | keep_on_top | If True the window will remain above all current windows | -| bool | any_key_closes | If True then will turn on return_keyboard_events for the window which will cause window to close as soon as any key is pressed. Normally the return key only will close the window. Default is false. | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of your arguments. Load up the call with stuff to see! | +| str | title | Optional title for the window. If none provided, the first arg will be used instead. | +| Tuple[str, str] or None | button_color | Color of the buttons shown (text color, button color) | +| str | background_color | Window's background color | +| str | text_color | text color | +| int | button_type | NOT USER SET! Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). There are many Popup functions and they call Popup, changing this parameter to get the desired effect. | +| bool | auto_close | If True the window will automatically close | +| int | auto_close_duration | time in seconds to keep window open before closing it automatically | +| Tuple[str, str] or str | custom_text | A string or pair of strings that contain the text to display on the buttons | +| bool | non_blocking | If True then will immediately return from the function without waiting for the user's input. | +| str or bytes | icon | icon to display on the window. Same format as a Window call | +| int | line_width | Width of lines in characters. Defaults to MESSAGE_BOX_LINE_WIDTH | +| str or Tuple[font_name, size, modifiers] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True will not show the frame around the window and the titlebar across the top | +| bool | grab_anywhere | If True can grab anywhere to move the window. If no_titlebar is True, grab_anywhere should likely be enabled too | +| Tuple[int, int] | location | Location on screen to display the top left corner of window. Defaults to window centered on screen | +| bool | keep_on_top | If True the window will remain above all current windows | +| bool | any_key_closes | If True then will turn on return_keyboard_events for the window which will cause window to close as soon as any key is pressed. Normally the return key only will close the window. Default is false. | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X The other output Popups are variations on parameters. Usually the button_type parameter is the primary one changed. @@ -1504,46 +1504,46 @@ want, just like a print statement. ``` popup_scrolled(args=*<1 or N object>, - title=None, - button_color=None, - background_color=None, - text_color=None, - yes_no=False, - auto_close=False, - auto_close_duration=None, - size=(None, None), - location=(None, None), - non_blocking=False, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - font=None, - image=None, - modal=True) + title = None, + button_color = None, + background_color = None, + text_color = None, + yes_no = False, + auto_close = False, + auto_close_duration = None, + size = (None, None), + location = (None, None), + non_blocking = False, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + font = None, + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| bool | yes_no | If True, displays Yes and No buttons instead of Ok | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high | -| Tuple[int, int] | location | Location on the screen to place the upper left corner of the window | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None, TIMEOUT_KEY] | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| bool | yes_no | If True, displays Yes and No buttons instead of Ok | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high | +| Tuple[int, int] | location | Location on the screen to place the upper left corner of the window | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True, than can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None or TIMEOUT_KEY | **RETURN** | Returns text of the button that was pressed. None will be returned if user closed window with X Typical usage: @@ -1569,47 +1569,47 @@ Show Popup window and immediately return (does not block) ``` popup_no_wait(args=*<1 or N object>, - title=None, - button_type=0, - button_color=None, - background_color=None, - text_color=None, - auto_close=False, - auto_close_duration=None, - non_blocking=True, - icon=None, - line_width=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=False) + title = None, + button_type = 0, + button_color = None, + background_color = None, + text_color = None, + auto_close = False, + auto_close_duration = None, + non_blocking = True, + icon = None, + line_width = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Any | *args | Variable number of items to display | -| str | title | Title to display in the window. | -| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| bool | auto_close | if True window will close itself | -| Union[int, float] | auto_close_duration | Older versions only accept int. Time in seconds until window will close | -| bool | non_blocking | if True the call will immediately return rather than waiting on user input | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| int | line_width | Width of lines in characters | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | -| Union[str, None] | **RETURN** | Reason for popup closing +| Any | *args | Variable number of items to display | +| str | title | Title to display in the window. | +| int | button_type | Determines which pre-defined buttons will be shown (Default value = POPUP_BUTTONS_OK). | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bool | auto_close | if True window will close itself | +| int or float | auto_close_duration | Older versions only accept int. Time in seconds until window will close | +| bool | non_blocking | if True the call will immediately return rather than waiting on user input | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| int | line_width | Width of lines in characters | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = False | +| str or None | **RETURN** | Reason for popup closing The `popup` call `popup_no_wait` or `popup_non_blocking` will create a popup window and then immediately return control back to you. You can turn other popup calls into non-blocking popups if they have a `non_blocking` parameter. Setting `non_blocking` to True will cause the function to return immediately rather than waiting for the window to be closed. @@ -1636,44 +1636,44 @@ Display Popup with text entry field. Returns the text entered or None if closed ``` popup_get_text(message, - title=None, - default_text="", - password_char="", - size=(None, None), - button_color=None, - background_color=None, - text_color=None, - icon=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - image=None, - modal=True) + title = None, + default_text = "", + password_char = "", + size = (None, None), + button_color = None, + background_color = None, + text_color = None, + icon = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | message | message displayed to user | -| str | title | Window title | -| str | default_text | default value to put into input area | -| str | password_char | character to be shown instead of actually typed characters | -| (int, int) | size | (width, height) of the InputText Element | -| Tuple[str, str] or str | button_color | Color of the button (text, background) | -| str | background_color | background color of the entire window | -| str | text_color | color of the message text | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True can click and drag anywhere in the window to move the window | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | (x,y) Location on screen to display the upper left corner of window | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None] | **RETURN** | Text entered or None if window was closed or cancel button clicked +| str | message | message displayed to user | +| str | title | Window title | +| str | default_text | default value to put into input area | +| str | password_char | character to be shown instead of actually typed characters | +| (int, int) | size | (width, height) of the InputText Element | +| Tuple[str, str] or str | button_color | Color of the button (text, background) | +| str | background_color | background color of the entire window | +| str | text_color | color of the message text | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True can click and drag anywhere in the window to move the window | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | (x,y) Location on screen to display the upper left corner of window | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None | **RETURN** | Text entered or None if window was closed or cancel button clicked ```python import PySimpleGUI as sg @@ -1693,54 +1693,54 @@ Display popup window with text entry field and browse button so that a file can ``` popup_get_file(message, - title=None, - default_path="", - default_extension="", - save_as=False, - multiple_files=False, - file_types=(('ALL Files', '*.*'),), - no_window=False, - size=(None, None), - button_color=None, - background_color=None, - text_color=None, - icon=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - initial_folder=None, - image=None, - modal=True) + title = None, + default_path = "", + default_extension = "", + save_as = False, + multiple_files = False, + file_types = (('ALL Files', '*.*'),), + no_window = False, + size = (None, None), + button_color = None, + background_color = None, + text_color = None, + icon = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + initial_folder = None, + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | message | message displayed to user | -| str | title | Window title | -| str | default_path | path to display to user as starting point (filled into the input field) | -| str | default_extension | If no extension entered by user, add this to filename (only used in saveas dialogs) | -| bool | save_as | if True, the "save as" dialog is shown which will verify before overwriting | -| bool | multiple_files | if True, then allows multiple files to be selected that are returned with ';' between each filename | -| Tuple[Tuple[str,str]] | file_types | List of extensions to show using wildcards. All files (the default) = (("ALL Files", "*.*"),) | -| bool | no_window | if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown | -| (int, int) | size | (width, height) of the InputText Element | -| Tuple[str, str] or str | button_color | Color of the button (text, background) | -| str | background_color | background color of the entire window | -| str | text_color | color of the text | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str | initial_folder | location in filesystem to begin browsing | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None] | **RETURN** | string representing the file(s) chosen, None if cancelled or window closed with X +| str | message | message displayed to user | +| str | title | Window title | +| str | default_path | path to display to user as starting point (filled into the input field) | +| str | default_extension | If no extension entered by user, add this to filename (only used in saveas dialogs) | +| bool | save_as | if True, the "save as" dialog is shown which will verify before overwriting | +| bool | multiple_files | if True, then allows multiple files to be selected that are returned with ';' between each filename | +| Tuple[Tuple[str,str]] | file_types | List of extensions to show using wildcards. All files (the default) = (("ALL Files", "*.*"),) | +| bool | no_window | if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown | +| (int, int) | size | (width, height) of the InputText Element | +| Tuple[str, str] or str | button_color | Color of the button (text, background) | +| str | background_color | background color of the entire window | +| str | text_color | color of the text | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str | initial_folder | location in filesystem to begin browsing | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None | **RETURN** | string representing the file(s) chosen, None if cancelled or window closed with X If configured as an Open File Popup then (save_as is not True) the dialog box will look like this. @@ -1769,46 +1769,46 @@ Display popup with text entry field and browse button so that a folder can be ch ``` popup_get_folder(message, - title=None, - default_path="", - no_window=False, - size=(None, None), - button_color=None, - background_color=None, - text_color=None, - icon=None, - font=None, - no_titlebar=False, - grab_anywhere=False, - keep_on_top=False, - location=(None, None), - initial_folder=None, - image=None, - modal=True) + title = None, + default_path = "", + no_window = False, + size = (None, None), + button_color = None, + background_color = None, + text_color = None, + icon = None, + font = None, + no_titlebar = False, + grab_anywhere = False, + keep_on_top = False, + location = (None, None), + initial_folder = None, + image = None, + modal = True) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | message | message displayed to user | -| str | title | Window title | -| str | default_path | path to display to user as starting point (filled into the input field) | -| bool | no_window | if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown | -| (int, int) | size | (width, height) of the InputText Element | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| str | background_color | color of background | -| str | text_color | color of the text | -| Union[bytes, str] | icon | filename or base64 string to be used for the window's icon | -| Union[str, Tuple[str, int]] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True no titlebar will be shown | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | keep_on_top | If True the window will remain above all current windows | -| Tuple[int, int] | location | Location of upper left corner of the window | -| str | initial_folder | location in filesystem to begin browsing | -| str) or (bytes | image | Image to include at the top of the popup window | -| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | -| Union[str, None] | **RETURN** | string representing the path chosen, None if cancelled or window closed with X +| str | message | message displayed to user | +| str | title | Window title | +| str | default_path | path to display to user as starting point (filled into the input field) | +| bool | no_window | if True, no PySimpleGUI window will be shown. Instead just the tkinter dialog is shown | +| (int, int) | size | (width, height) of the InputText Element | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| str | background_color | color of background | +| str | text_color | color of the text | +| bytes or str | icon | filename or base64 string to be used for the window's icon | +| str or Tuple[str, int] | font | specifies the font family, size, etc | +| bool | no_titlebar | If True no titlebar will be shown | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | keep_on_top | If True the window will remain above all current windows | +| Tuple[int, int] | location | Location of upper left corner of the window | +| str | initial_folder | location in filesystem to begin browsing | +| str or bytes | image | Image to include at the top of the popup window | +| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | +| str or None | **RETURN** | string representing the path chosen, None if cancelled or window closed with X This is a typical call @@ -1832,39 +1832,39 @@ Show animation one frame at a time. This function has its own internal clocking ``` popup_animated(image_source, - message=None, - background_color=None, - text_color=None, - font=None, - no_titlebar=True, - grab_anywhere=True, - keep_on_top=True, - location=(None, None), - alpha_channel=None, - time_between_frames=0, - transparent_color=None, - title="", - icon=None) + message = None, + background_color = None, + text_color = None, + font = None, + no_titlebar = True, + grab_anywhere = True, + keep_on_top = True, + location = (None, None), + alpha_channel = None, + time_between_frames = 0, + transparent_color = None, + title = "", + icon = None) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| Union[str, bytes] | image_source | Either a filename or a base64 string. | -| str | message | An optional message to be shown with the animation | -| str | background_color | color of background | -| str | text_color | color of the text | -| Union[str, tuple] | font | specifies the font family, size, etc | -| bool | no_titlebar | If True then the titlebar and window frame will not be shown | -| bool | grab_anywhere | If True then you can move the window just clicking anywhere on window, hold and drag | -| bool | keep_on_top | If True then Window will remain on top of all other windows currently shownn | -| (int, int) | location | (x,y) location on the screen to place the top left corner of your window. Default is to center on screen | -| float | alpha_channel | Window transparency 0 = invisible 1 = completely visible. Values between are see through | -| int | time_between_frames | Amount of time in milliseconds between each frame | -| str | transparent_color | This color will be completely see-through in your window. Can even click through | -| str | title | Title that will be shown on the window | -| str | icon | Same as Window icon parameter. Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | +| str or bytes | image_source | Either a filename or a base64 string. | +| str | message | An optional message to be shown with the animation | +| str | background_color | color of background | +| str | text_color | color of the text | +| str or tuple | font | specifies the font family, size, etc | +| bool | no_titlebar | If True then the titlebar and window frame will not be shown | +| bool | grab_anywhere | If True then you can move the window just clicking anywhere on window, hold and drag | +| bool | keep_on_top | If True then Window will remain on top of all other windows currently shownn | +| (int, int) | location | (x,y) location on the screen to place the top left corner of your window. Default is to center on screen | +| float | alpha_channel | Window transparency 0 = invisible 1 = completely visible. Values between are see through | +| int | time_between_frames | Amount of time in milliseconds between each frame | +| str | transparent_color | This color will be completely see-through in your window. Can even click through | +| str | title | Title that will be shown on the window | +| str | icon | Same as Window icon parameter. Can be either a filename or Base64 value. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | | None | **RETURN** | No return value ***To close animated popups***, call PopupAnimated with `image_source=None`. This will close all of the currently open PopupAnimated windows. @@ -1876,33 +1876,33 @@ We all have loops in our code. 'Isn't it joyful waiting, watching a counter scr one_line_progress_meter(title, current_value, max_value, - key="OK for 1 meter", + key = "OK for 1 meter", args=*<1 or N object>, - orientation="v", - bar_color=(None, None), - button_color=None, - size=(20, 20), - border_width=None, - grab_anywhere=False, - no_titlebar=False) + orientation = "v", + bar_color = (None, None), + button_color = None, + size = (20, 20), + border_width = None, + grab_anywhere = False, + no_titlebar = False) ``` Parameter Descriptions: |Type|Name|Meaning| |--|--|--| -| str | title | text to display in eleemnt | -| int | current_value | current value | -| int | max_value | max value of QuickMeter | -| Union[str, int, tuple, object] | key | Used to differentiate between mutliple meters. Used to cancel meter early. Now optional as there is a default value for single meters | -| Any | *args | stuff to output | -| str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') | -| Tuple(str, str) | bar_color | color of a bar line | -| Tuple[str, str] or str | button_color | button color (foreground, background) | -| (int, int) | size | (w,h) w=characters-wide, h=rows-high (Default value = DEFAULT_PROGRESS_BAR_SIZE) | -| int | border_width | width of border around element | -| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | -| bool | no_titlebar | If True: no titlebar will be shown on the window | +| str | title | text to display in eleemnt | +| int | current_value | current value | +| int | max_value | max value of QuickMeter | +| str or int or tuple or object | key | Used to differentiate between mutliple meters. Used to cancel meter early. Now optional as there is a default value for single meters | +| Any | *args | stuff to output | +| str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') | +| Tuple(str, str) | bar_color | color of a bar line | +| Tuple[str, str] or str | button_color | button color (foreground, background) | +| (int, int) | size | (w,h) w=characters-wide, h=rows-high (Default value = DEFAULT_PROGRESS_BAR_SIZE) | +| int | border_width | width of border around element | +| bool | grab_anywhere | If True: can grab anywhere to move the window (Default = False) | +| bool | no_titlebar | If True: no titlebar will be shown on the window | | (bool) | **RETURN** | True if updated successfully. False if user closed the meter with the X or Cancel button Here's the one-line Progress Meter in action! @@ -8203,6 +8203,67 @@ Menu colors and font, fixes * Bug in finalize code +## 4.33.0 PySimpleGUI 2-Jan-2021 (Happy New Year!) + +The let's kickoff 2021 release! + +Custom Titlebars, Fix for Docstrings so PyCharm 2020 works correctly, New shortcuts, Window Close Attempted + +* Custom Titlebar - new element + * Initial reason was Trinket, but great feature overall + * Allows windows to be styled to match the colors of the window + * Automatically uses theme for colors + * Automatically used when running on Trinket + * Can specify using them by using set_options, a Titlebar element, or parameters in Window creation + * Documentation is coming soonish + * Demo exists showing how to use (it's enough that you won't need a Cookbook / detailed docs to add it to your own program) + * Changes include adding a 16x16 pixel version of the PySimpleGUI icon + * popups - If custom titlebar is set using set_options (and is thus globally applied) then popups will use the custom titlebar +* MASSIVE number of changes to docstrings so that PyCharm again works correctly. All Unions had to be changed to use "|" instead +* Internal functions added to check what OS is being used rather than having os.platform checks all over thee place +* Element.Visible removed. Element.visible property returns current visibility state for element + * This is a read-only property +* Added dummy Element.update method so that PyCharm doesn't complain about a missing method +* InputElement class changed to Input. Both will work as InputElement is now an alias +* Fix in Spin.update. Was using an illegal state value of "enable" rather than "normal" +* New Shortcuts for Elements + * Sp = Spin + * SBar = StatusBar + * BM = ButtonMenu + * Progress = ProgressBar + * Im = Image + * G = Graph + * Fr = Frame + * Sl = Slider +* Button - Allow button color background to be specified as None. This will cause the theme's color to be auto chosen as background +* Image.DrawArc - fill_color parameter added +* Column - update now uses the expand information so that a column will re-pack correctly when made invisible to visible. Added fill parm to pack call +* New Window parameters: + * enable_close_attempted_event=False + * titlebar_background_color=None + * titlebar_text_color=None + * titlebar_font=None + * titlebar_icon=None + * use_custom_titlebar=None +* Removed "Faking Timeout" print because the state that triggered it can be reached using a normal auto-closing window +* Can now intercept window close attempts when the user clicks X + * If you don't want "X" to close the window, set enable_close_attempted_event to True when creating window + * When enabled a WINDOW_CLOSE_ATTEMPTED_EVENT will be returned from read instead of WIN_CLOSED + * Multiple aliases for the key: WINDOW_CLOSE_ATTEMPTED_EVENT, WIN_X_EVENT, WIN_CLOSE_ATTEMPTED_EVENT +* New Window property - key_dict + * Returns the "All keys dictionary" which has keys and elements for all elements that have keys specified +* pin helper function got 2 new parameters - expand_x=None, expand_y=None. Was needed for the Titlebar element +* no_titlebar implementation changed on Linux. Not using "splash" and instead using "dock". Was needed to get the minimize/restore to work +* New set_options parameters in support of custom Titlebar element + * use_custom_titlebar=None + * titlebar_background_color=None + * titlebar_text_color=None + * titlebar_font=None + * titlebar_icon=None +* get_globals removed - not required for normal PySimpleGUI. Was only used by patched packages which will need to fork PySimpleGUI for this feature. +* popup - support for custom titlebar! +* Changed from pathlib to os.path + ## Upcoming The future for PySimpleGUI looks bright!