Пример #1
0
def managed_columns(name: str,
                    columns: int,
                    *,
                    border: bool = True,
                    show: bool = True,
                    parent: str = "",
                    before: str = ""):
    """Wraps add_managed_columns() 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.
        columns: The number of columns to be created.
        **border: Shows a border.
        **show: Decides if the item is shown of not.
        **parent: Parent this item will be added to. (runtime adding)
        **before: This item will be displayed before the specified item in the parent. (runtime adding)

    Returns:
        None
    """
    try:
        yield internal_dpg.add_managed_columns(name,
                                               columns,
                                               border=border,
                                               show=show,
                                               parent=parent,
                                               before=before)

    finally:
        internal_dpg.end()
Пример #2
0
def managed_columns(name: str,
                    columns: int,
                    border: bool = True,
                    show: bool = True,
                    parent: str = "",
                    before: str = ""):
    try:
        yield internalDPG.add_managed_columns(name,
                                              columns,
                                              border=border,
                                              show=show,
                                              parent=parent,
                                              before=before)

    finally:
        internalDPG.end()
Пример #3
0
 def _setup_add_widget(self, dpg_args) -> None:
     dpgcore.add_managed_columns(name=self.id, **dpg_args)