dlg_new()

Creates a new custom dialog window.

Returns a handle to the created dialog.

Syntax

planetcnc.dlg_new(name=None)

Parameters

Parameter Type Description Comment
name string Optional name for the new dialog. optional

Return Value

Examples

#! /usr/bin/env python
 
import planetcnc
 
# Create a new dialog without a specific name
dialog_handle = planetcnc.dlg_new()
 
if dialog_handle:
    print("Dialog created with handle:", dialog_handle)
else:
    print("Failed to create dialog.")
 
# Create a new dialog with a custom name
dialog_handle = planetcnc.dlg_new("MyDialog")
print("Dialog created with handle:", dialog_handle)

See also

dlg_new
dlg_init
dlg_update
dlg_clear

dlg_show
dlg_run
dlg_abort

dlg_is_valid
dlg_keep_open
dlg_callback