DIAdem Help

Object: Image

  • Updated2024-09-12
  • 1 minute(s) read

Object: Image

The Image object provides the properties of a graphic in DIAdem REPORT.

The following example inserts a graphic into the current worksheet and assigns a transparent background to this graphic:

VBScriptPython

 

Dim oMyImage, oMyPos
Call Report.NewLayout()
Set oMyImage = Report.ActiveSheet.Objects.Add(eReportObjectImage, "MyImage")
Set oMyPos = oMyImage.Position.ByCoordinate
oMyPos.X1 = 20
oMyPos.X2 = 60
oMyPos.Y1 = 20
oMyPos.Y2 = 60
oMyImage.FileName = MediaLibrPath & "Example1.png"
Call oMyImage.BackgroundColor.SetPredefinedColor(eColorIndexNone)
Call Report.Refresh()