dlg_set_pos()

Sets the position of a dialog window on the screen.

Moves the dialog to the specified `(x, y)` coordinates.

Syntax

planetcnc.dlg_set_pos(handle, x, y)

Parameters

Parameter Type Description Comment
handle string Handle of the dialog to move.
x int X-coordinate of the new position.
y int Y-coordinate of the new position.

Return Value

Examples

#! /usr/bin/env python
 
import planetcnc
 
# Move an existing dialog to position (100, 200)
dialog_handle = "MyDialogHandle"
planetcnc.dlg_set_pos(dialog_handle, 100, 200)
 
print("Dialog moved to (100, 200).")

See also

dlg_set_modal
dlg_set_resizable
dlg_set_pos
dlg_set_size
dlg_set_btn
dlg_set_name
dlg_set_color