mshflexgrid + Text 输入以搞定,但是在滚动mshflexgrid 时内容滚动了但text 不会滚动呀,这样text就会错误的出现在哪里。
我试过用scroll 事件,当滚动时把 text.visible=flase 但滚动回来时要怎么让 text.visible=true呀!请高手帮忙呀。行了就给分。有两种一是上下滚动一是左右
我试过用scroll 事件,当滚动时把 text.visible=flase 但滚动回来时要怎么让 text.visible=true呀!请高手帮忙呀。行了就给分。有两种一是上下滚动一是左右
With MSFlexGrid1
Text1.Visible = .RowIsVisible(.Row)
If Text1.Visible Then
Text1.Move .CellLeft + .Left, .CellTop + .Top, .CellWidth, .CellHeight
Text1.SetFocus
End If
End With
End Sub
首先谢谢你,上下滚动时可以用,左右滚动时用ColIsVisible(.col) 但是我要怎么判断是左右滚动还是上下滚动呀。
Private Sub CeHFlex_Scroll()
With CeHFlex
TextSL.Visible = .ColIsVisible(.Col)
'TextSL.Visible = .RowIsVisible(.Row)
If TextSL.Visible Then
Call TextSLMove
TextSL.SetFocus
End If
End With
End Sub
左右和上下滚动搞定就给分了
不要老做田鸭,否则没有提高~~~~~~~Private Sub MSFlexGrid1_Scroll()
With MSFlexGrid1
If .ColIsVisible(.Col) And .RowIsVisible(.Row) Then
Text1.Visible = True
Text1.Move .CellLeft + .Left, .CellTop + .Top, .CellWidth, .CellHeight
Text1.SetFocus
Else
Text1.Visible = False
End If
End With
End Sub
(RowIsVisible 属性返回或设置一个值,决定一个指定行是否可见)书上是这么写的
以前我用 .RowIsVisible(3) 这样去隐藏第三行老是出错,提示属性无效。
能说说吗?
谢谢了