SetGridRowColImage Method (WinStudio Scripts)

Applies To

IWSFormComponent interface, grid objects

Definition

Assigns a specified image file to display in a grid cell. This method uses integers to specify the cell location.

Syntax

object.SetGridRowColImage( integer1, integer2, string )

  Part   Description
object Required. A reference to a grid object.
integer1 Required. Indicates the row number.

Row numbering is 1-based.

If you use 0 (zero) for this value, the image displays in the header row.

integer2 Required. Indicates the column number.

Column numbering is 1-based.

string Required. The name of an image file found in the WinStudio executable directory.
Note: Supported image file types include *.bmp, *.emf, *.exif, *.gif, *.ico, *.jpg, and *.png.

Remarks

The image file must reside in the same directory as winstudio.exe.

The height of the cell in which the image appears adjusts automatically to fit the height dimension of the image file. The width of the column can be preset or manually adjusted to accommodate the width of the image.

To clear an image from a particular cell, use this method and pass an empty string (" ") for the image file string.

Example


Sub Main()
   'The following code assigns the graphic file
   'to the header row cell in the first column.
   ThisForm.Components("FormCollectionGrid").SetGridRowColImage(0, 1, "MyImage.png")
End Sub