dlg_keep_open()

Prevents a dialog from closing when the close button is clicked.

Allows the dialog to be cleared and reused instead of being closed.

Syntax

planetcnc.dlg_keep_open(handle, keep_open=True)

Parameters

Parameter Type Description Comment
handle string Handle of the dialog to modify.
keep_open bool Set to `True` to prevent closing, `False` to allow it. optional

Return Value

Examples

#! /usr/bin/env python
 
import planetcnc
 
# Prevent an existing dialog from closing
dialog_handle = "MyDialogHandle"
planetcnc.dlg_keep_open(dialog_handle, True)
 
print("Dialog will remain open.")

See also

dlg_new
dlg_init
dlg_update
dlg_clear

dlg_show
dlg_run
dlg_abort

dlg_is_valid
dlg_keep_open
dlg_callback