SetGridRowColFont Method (WinStudio Scripts)

Applies To

IWSFormComponent interface, grid objects

Definition

Assigns a font face and size to be used in a specified cell, and automatically adjusts the height of the row, if necessary, to accommodate the assigned font.

Syntax

object.SetGridRowColFont( integer1, integer2, string, Boolean )

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

Row numbering is 1-based.

integer2 Required. Indicates the column number.

Column numbering is 1-based.

If you use 0 (zero) for this value, the colors are applied to the entire row.

string Required. Font descriptor string consisting of fourteen comma-separated values:

    Size,0,0,0,Weight,Italic,Underline,Strikethrough,0,0,0,0,0,FontFamily

For more information about these values, see "Settings" below.

Boolean Required. Determines whether the system should adjust the height of the row, if necessary, to accommodate the font face and size being assigned.
  • TRUE: The system is to adjust the row height if necessary.
  • FALSE: The system should not adjust the row height.

Unless you have specific reasons for doing otherwise, you should use a value of TRUE.

Settings

  Setting   Description
Size A decimal value representing the point size.
Weight Range from 0 (non-bold) to 700 (bold).
Italic 0 = Normal text.

1 = Italicized text.

Underline 0 = Text not underlined.

1 = Text underlined.

Strikethrough 0 = Normal text.

1 = Text struck through.

FontFamily Name of the font to be used.

Example


Sub Main()
   'Sets the font for the specified cell to 12-point bold Times New Roman.
   Dim fontDescriptor As String = "12,0,0,0,700,0,0,0,0,0,0,0,0,Times New Roman"  
   ThisForm.Components("grid").SetGridRowColFont(3, 1, fontDescriptor, True)
End Sub
Rubriques liées