1. Here is a Generic routine I've put together a while back:
Code:
Public Function ResizeGrid(pGrid As MSFlexGrid, pForm As Form)
Dim intRow As Integer
Dim intCol As Integer
With pGrid
For intCol = 0 To .Cols - 1
For intRow = 0 To .Rows - 1
If .ColWidth(intCol) < pForm.TextWidth(.TextMatrix(intRow, intCol)) + 100 Then
.ColWidth(intCol) = pForm.TextWidth(.TextMatrix(intRow, intCol)) + 100
End If
Next
Next
End With
End Function
Then just call this routine like this:
ResizeGrid MSFlexGrid1, Form1
2. Let's say you want to put picture into the First column of the second row:
Code:
With MSFlexGrid1
.Col = 0
.Row = 1
Set CellPicture = LoadPicture("C:\MyPicture.bmp")
End With