dlg_comp_value()

Gets or sets the value of a component within a dialog.

Syntax

planetcnc.dlg_comp_value(component)
planetcnc.dlg_comp_value(component, value)

Parameters

Parameter Type Description Comment
component capsule Capsule object representing the component.
value varies New value to set for the component (optional). optional

Return Value

Examples

#! /usr/bin/env python
 
import planetcnc
 
# Get the current value of a component
current_value = planetcnc.dlg_comp_value(my_component)
print("Current value:", current_value)
 
# Set a new value for the component
planetcnc.dlg_comp_value(my_component, 42)
 
print("Component value updated.")

See also

dlg_comp_pos
dlg_comp_size
dlg_comp_color
dlg_comp_font
dlg_comp_name
dlg_comp_value
dlg_comp_callback