Hi all,
How do we change a back color of a cell in MSHFLEXGRID during run time
Thanks
Printable View
Hi all,
How do we change a back color of a cell in MSHFLEXGRID during run time
Thanks
Hi
Check out the Cell[...] group of items in help. One of these is CellBackColor. Here is some code. Note that to colour a row u must set the col and colsel after the row and vice versa for a column
Regards
Stuart
VB Code:
Private Sub Command1_Click() 'Colour a cell With MSFlexGrid1 .Col = 1 .Row = 1 .CellBackColor = vbRed End With 'Colour a row With MSFlexGrid1 .FillStyle = flexFillRepeat .Row = 1 .Col = 1 .ColSel = 3 .CellBackColor = vbRed End With 'Colour a column With MSFlexGrid1 .FillStyle = flexFillRepeat .Col = 1 .Row = 1 .RowSel = 3 .CellBackColor = vbRed End With End Sub