请教各位大侠,
在做Fpspread时 需求在其中的单元格嵌入RichTextBox来读取RTF文件
但是无法获取单元格的Left和Top
不知道有什么样的方法可以取到这两个值小女子感激不尽,谢谢各位了~~~~~~~~~~~~~

解决方案 »

  1.   

    Option ExplicitSub AlignAt(ByVal Col As Long, ByVal Row As Long)
        Dim x As Long
        Dim y As Long
        Dim lWidth As Long
        Dim lHeight As Long    With vaSpread1
            .GetCellPos Col, Row, x, y, lWidth, lHeight
            If (x < 0) Or (y < 0) Then
                RichTextBox1.Visible = False
            Else
                RichTextBox1.Move .Left + x, .Top + y, lWidth, lHeight
                RichTextBox1.Visible = True
            End If
        End With
    End Sub
      

  2.   

    谢谢,好像每次都是你出来帮我,十分感谢
    还有个问题,就是滚轮滚动的时候,RichTextBox不能跟着动,这个要咋解决呢?
    大侠能不能再提示下?谢谢!!
      

  3.   

    响应 TopLeftChange 事件,重新定位一下。