def popup(popupparent: str, name: str, *, mousebutton: int = 1, modal: bool = False, parent: str = "", before: str = "", width: int = 0, height: int = 0, show: bool = True): """Wraps add_popup() and automates calling end(). Args: popupparent: Parent that the popup will be assigned to. 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. **mousebutton: The mouse code that will trigger the popup. Default is 1 or mvMouseButton_Right. (mvMouseButton_Left, mvMouseButton_Right, mvMouseButton_Middle, mvMouseButton_X1, mvMouseButton_X2) **modal: Makes the popup modal. **parent: Parent to add this item to. (runtime adding) **before: This item will be displayed before the specified item in the parent. (runtime adding) **width: Width of the item. **height: Height of the item. **show: Decides if the item is shown of not. Returns: None """ try: yield internal_dpg.add_popup(popupparent, name, mousebutton=mousebutton, modal=modal, parent=parent, before=before, width=width, height=height, show=show) finally: internal_dpg.end()
def popup(popupparent: str, name: str, mousebutton: int = 1, modal: bool = False, parent: str = "", before: str = "", width: int = 0, height: int = 0): try: yield dpg.add_popup(popupparent, name, mousebutton=mousebutton, modal=modal, parent=parent, before=before, width=width, height=height) finally: dpg.end()
def popup(popupparent: str, name: str, mousebutton: int = 1, modal: bool = False, parent: str = "", before: str = "", width: int = 0, height: int = 0, show: bool = True): try: yield internalDPG.add_popup(popupparent, name, mousebutton=mousebutton, modal=modal, parent=parent, before=before, width=width, height=height, show=show) finally: internalDPG.end()
def _setup_add_widget(self, dpg_args) -> None: dpgcore.add_popup(self._popup_parent.id, self.id, **dpg_args)