def tab(name: str, closable: bool = False, label: str = "__DearPyGuiDefault", show: bool = True, tip: str = "", parent: str = "", before: str = ""): try: if label == "__DearPyGuiDefault": yield internalDPG.add_tab(name, closable=closable, show=show, tip=tip, parent=parent, before=before) else: yield internalDPG.add_tab(name, closable=closable, label=label, show=show, tip=tip, parent=parent, before=before) finally: internalDPG.end()
def tab(name: str, *, closable: bool = False, label: str = "__DearPyGuiDefault", show: bool = True, tip: str = "", no_reorder: bool = False, leading: bool = False, trailing: bool = False, no_tooltip: bool = False, parent: str = "", before: str = ""): """Wraps add_tab() and automates calling end(). Args: name: Unique name used to programmatically refer to the item. If label is unused this will be the label, anything after "##" that occurs in the name will not be shown on screen. **closable: creates a button on the tab that can hide the tab. **label: Displayed name of the item. **show: Decides if the item is shown of not. **no_reorder: Disable reordering this tab or having another tab cross over this tab **leading: Enforce the tab position to the left of the tab bar (after the tab list popup button) **trailing: Enforce the tab position to the right of the tab bar (before the scrolling buttons) **no_tooltip: Disable tooltip for the given tab **tip: Adds a simple tooltip. **parent: Parent to add this item to. (runtime adding) **before: This item will be displayed before the specified item in the parent. (runtime adding) Returns: None """ try: if label == "__DearPyGuiDefault": yield internal_dpg.add_tab(name, closable=closable, show=show, tip=tip, parent=parent, before=before, no_reorder=no_reorder, leading=leading, trailing=trailing, no_tooltip=no_tooltip) else: yield internal_dpg.add_tab(name, closable=closable, label=label, show=show, tip=tip, parent=parent, before=before, no_reorder=no_reorder, leading=leading, trailing=trailing, no_tooltip=no_tooltip) finally: internal_dpg.end()
def tab(*args, closable: bool = False, label: str = "", show: bool = True, no_reorder: bool = False, leading: bool = False, trailing: bool = False, no_tooltip: bool = False, parent: str = "", before: str = "", id:str='', indent=-1): """Wraps add_tab() and automates calling end(). Args: name: Unique name used to programmatically refer to the item. If label is unused this will be the label, anything after "##" that occurs in the name will not be shown on screen. **closable: creates a button on the tab that can hide the tab. **label: Displayed name of the item. **show: Decides if the item is shown of not. **no_reorder: Disable reordering this tab or having another tab cross over this tab **leading: Enforce the tab position to the left of the tab bar (after the tab list popup button) **trailing: Enforce the tab position to the right of the tab bar (before the scrolling buttons) **no_tooltip: Disable tooltip for the given tab **parent: Parent to add this item to. (runtime adding) **before: This item will be displayed before the specified item in the parent. (runtime adding) Returns: None """ try: widget = internal_dpg.add_tab(*args, closable=closable, label=label, show=show, parent=parent, before=before, no_reorder=no_reorder, leading=leading, trailing=trailing, no_tooltip=no_tooltip, id=id, indent=indent) internal_dpg.push_container_stack(widget) yield widget finally: internal_dpg.pop_container_stack()
def tab(name: str, *, closable: bool = False, label: str = "__DearPyGuiDefault", show: bool = True, tip: str = "", parent: str = "", before: str = ""): """Wraps add_tab() and automates calling end(). Args: name: Unique name used to programmatically refer to the item. If label is unused this will be the label, anything after "##" that occurs in the name will not be shown on screen. **closable: creates a button on the tab that can hide the tab. **label: Displayed name of the item. **show: Decides if the item is shown of not. **tip: Adds a simple tooltip. **parent: Parent to add this item to. (runtime adding) **before: This item will be displayed before the specified item in the parent. (runtime adding) Returns: None """ try: if label == "__DearPyGuiDefault": yield internal_dpg.add_tab(name, closable=closable, show=show, tip=tip, parent=parent, before=before) else: yield internal_dpg.add_tab(name, closable=closable, label=label, show=show, tip=tip, parent=parent, before=before) finally: internal_dpg.end()
def tab(name: str, closable: bool = False, tip: str = "", parent: str = "", before: str = ""): try: yield dpg.add_tab(name, closable=closable, tip=tip, parent=parent, before=before) finally: dpg.end()
def _add(self): add_tab(self.name, closable=self.closable, **self.default_config)
def _setup_add_widget(self, dpg_args) -> None: dpgcore.add_tab(self.id, **dpg_args)