是对整个MSFlexGrid1的属性
只需要显示得到焦点的cell的值 如何设置
=============================================
比如:
Private Sub fg_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
fg.Row = fg.MouseRow
fg.Col = fg.MouseCol
fg.ToolTipText = fg.TextMatrix(fg.Row, fg.Col)
End Sub
'没有特定属性来自动调整,只能Coding来修改ColWidth
'如下函数用于自动调整,其中Row单元格的行,Col为单元格的列
Private Sub ColWidthByCell(ByVal Row As Long, ByVal Col As Long)
Dim lWidth As Long
lWidth = (LenB(StrConv(MSFlexGrid1.TextMatrix(Row, Col), vbFromUnicode)) + 1) * MSFlexGrid1.FontSize * 16 '16根据具体情况调整
If Row = 0 Then
MSFlexGrid1.ColWidth(Col) = lWidth
ElseIf MSFlexGrid1.ColWidth(Col) < lWidth Then
MSFlexGrid1.ColWidth(Col) = lWidth
End If
End Sub