SetGridRowColImageByColumnName Method (WinStudio Scripts)
Applies To
IWSFormComponent interface, grid objects
Definition
Assigns a specified image file to display in a grid cell. This method uses an integer to identify the row number and the column name to identify the column location.
Syntax
object.SetGridRowColImageByColumnName( integer, string1, string2 )
Part | Description |
object | Required. A reference to a grid object. |
integer | 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. |
string1 | Required. The name of the column component, as it is known in the WinStudio form metadata. |
string2 | 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 third row cell in the column named "CompanyLogo". ThisForm.Components("FormCollectionGrid"). _ SetGridRowColImageByColumnName(3, "CompanyLogo", "MyImage.png") End Sub