dlg_add_image()

Adds an image component to a dialog.

If a filename is provided, the image is loaded from the specified file.

Syntax

planetcnc.dlg_add_image(handle, filename=None)

Parameters

Parameter Type Description Comment
handle string Handle of the dialog to modify.
filename string Path to the image file (optional). optional

Return Value

Examples

#! /usr/bin/env python
 
import planetcnc
 
dlg_handle = planetcnc.dlg_new("Examples")
 
# Add an image component to a dialog 
planetcnc.dlg_add_image(dlg_handle, "Samples/GuessNumber.png")
 
planetcnc.dlg_show(dlg_handle)

See also

dlg_add_option
dlg_add_separator
dlg_add_image
dlg_add_label
dlg_add_checkbox
dlg_add_num_input
dlg_add_txt_input
dlg_add_dropbox
dlg_add_button