Skip to main content

SetPictureBoxImage

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

setPictureBoxImage(panel, control, imagefile);

Description

Replaces the image of the Panel Designer control during runtime: Picture Box. The panel is accessed by its individual panel name that is entered in the Panel Designer.

Parameters

  • panel: Panel name, restricted to 128 characters. "" – references all loaded panels.
  • control: Name of the control, restricted to 128 characters. "" – references all controls on the panel.
  • imagefile: Path and name of the image file.

Return Values

Example

Setting image file using absolute path.
on key 'x'
{
    SetPictureBoxImage("Movie", "Picture Box", "D:\\Example\\PictureBoxProject\\Images\\Picture.bmp");
}
Setting image file using relative path. The image is in the Images folder and this folder is parallel to the panel folder.
on key 'y'
{
    SetPictureBoxImage("Movie", "Picture Box", "..\\Images\\Picture.bmp");
}
SetMediaFile