CellFontItalicproperty
Returns or sets the italic style for the current cell text.
Syntax
PROPERTY CellFontItalic () AS BOOLEAN
PROPERTY CellFontItalic (BYVAL bItalic AS VARIANT_BOOL)
Parameters
| Name | Description | |
|---|---|---|
bItalic | True to set the attribue; False, othewise |
Description
Returns or sets the bold style for the current cell text.
Examples
' Select the cell at Row 1, Column 2 grid.Row = 1 grid.Col = 2
' Set the font of the selected cell to italic rid.CellFontItalic = True
' Select a range of cells (e.g., from Row 1, Col 1 to Row 5, Col 3) grid.Row = 1 grid.Col = 1 grid.RowSel = 5 grid.ColSel = 3
' Enable the FillStyle to apply changes to all selected cells grid.FillStyle = flexFillRepeat
' Set the font of all selected cells to italic grid.CellFontItalic = True
' Reset FillStyle to default for single-cell changes afterward grid.FillStyle = flexFillSingle
You can apply the style to multiple cells simultaneously by using the FillStyle property and setting the selection range with RowSel, ColSel.
Using Redraw = False before making many updates in a loop and setting it back to True after is recommended to prevent flickering and improve performance.
Reference
- Documented in Windows/Windows GUI/MSHFlexGrid Class.md
- Topic: Microsoft Hierarchical Grid