dlg_set_size()

Sets the size of a dialog window.

If width and height are set to `0, 0`, the size is automatically determined.

Syntax

planetcnc.dlg_set_size(handle, width, height)

Parameters

Parameter Type Description Comment
handle string Handle of the dialog to resize.
width int Width of the dialog (0 for automatic size detection).
height int Height of the dialog (0 for automatic size detection).

Return Value

Examples

#! /usr/bin/env python
 
import planetcnc
 
# Set a specific size for an existing dialog
dialog_handle = "MyDialogHandle"
planetcnc.dlg_set_size(dialog_handle, 400, 300)
 
print("Dialog resized to 400x300.")
 
# Enable automatic size detection
planetcnc.dlg_set_size(dialog_handle, 0, 0)
 
print("Dialog size set to automatic.")

See also

dlg_set_modal
dlg_set_resizable
dlg_set_pos
dlg_set_size
dlg_set_btn
dlg_set_name
dlg_set_color