dlg_click_close()
Triggers the “Close” button click in a dialog.
Syntax
planetcnc.dlg_click_close(handle)
Parameters
| Parameter | Type | Description | Comment |
| handle | string | Handle of the dialog containing the button. | |
Return Value
`True` if the “Close” button was successfully triggered.
`False` if the button was not found or could not be clicked.
Raises exception on error if the handle is invalid.
Examples
#! /usr/bin/env python
import planetcnc
# Trigger the Close button in a dialog
dialog_handle = "MyDialogHandle"
if planetcnc.dlg_click_close(dialog_handle):
print("Close button clicked.")
else:
print("Close button not found.")
See also