Sets a callback function for a dialog component, allowing for event-driven behavior (e.g., when a button is clicked).
Note that callback functions are not supported if the dialog is running in a waiting state.
planetcnc.dlg_comp_callback(component, callback, callbackArg=None)
#! /usr/bin/env python import planetcnc def my_callback(*args): print("Component callback invoked!", args) # Assign a callback to a button component planetcnc.dlg_comp_callback(my_button_component, my_callback) # Assign a callback with an optional argument planetcnc.dlg_comp_callback(my_button_component, my_callback, 42)