[求助]一段 MSFlexGrid代码看不懂
Private Sub MSFlexGrid1_entercell()Dim X As String, y As String, p As String
If MSFlexGrid1.CellWidth <= 0 Or MSFlexGrid1.CellHeight <= 0 Then Exit Sub
X = MSFlexGrid1.TextMatrix(MSFlexGrid1.FixedRows, MSFlexGrid1.Col)
y = MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 0)
If y <> "" Then
If MSFlexGrid1.Col - MSFlexGrid1.LeftCol <= 3 Then
MSFlexGrid1.LeftCol = MSFlexGrid1.LeftCol + 1
End If
If MSFlexGrid1.CellWidth > 0 And MSFlexGrid1.CellHeight > 0 Then
text1.Width = MSFlexGrid1.CellWidth
text1.Height = MSFlexGrid1.CellHeight
text1.Left = MSFlexGrid1.CellLeft + MSFlexGrid1.Left
text1.Top = MSFlexGrid1.CellTop + MSFlexGrid1.Top
End If
X = MSFlexGrid1.TextMatrix(MSFlexGrid1.FixedRows, MSFlexGrid1.Col)
y = MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 0)
p = MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, MSFlexGrid1.Col)
text1.Text = MSFlexGrid1.Text
text1.SelStart = 0
text1.SelLength = Len(text1.Text)
End If
End Sub
1、这段代码起什么作用?
2、X、Y的值是什么?
3、红色的那个IF判断在这个代码中起什么作用?
谢谢!